|
Same result. *scratches head*
To err is human. Fortune favors the monsters.
|
|
|
|
|
So the char must be sign-extended. But that does not, and cannot (due to the as-if rule), mean that the compiler must make that happen at run time, it can trivially be done at compile time after all.
|
|
|
|
|
Hmmm,
I'm not really sure what you're saying here. You are obviously referring to the code optimization pass. But this sentence doesn't make sense.
harold aptroot wrote: But that does not, and cannot, mean that the compiler must make that happen at run time Nearly every compiler will perform the sign-extending at run time with optimization disabled, I just tested 4 MSVC versions few hours ago with the code at the top of this thread.
Sure, it can be trivially optimized away.
|
|
|
|
|
I decided against any further elaboration
|
|
|
|
|
harold aptroot wrote: I decided against any further elaboration Because there isn't anything to elaborate.
It's OK, we all make mistakes. I was waiting to see what you had to say though.
|
|
|
|
|
My mistake was talking to you at all. Don't worry, that won't happen again.
|
|
|
|
|
I have no idea what's happening here, I apologize if I've offended you. It wasn't intentional.
Are you OK?
|
|
|
|
|
Disclaimer: I have never used templates and rarely use C++, so this is just an observation...
It looks like there is something swish about the use of pin and Pin - it might be worth accessing Pin as pin in the test() method? or something like that.
Good luck!
|
|
|
|
|
Try consteval , rather than constexpr , for test()
PS: Stack Overflow is a good place for questions like this.
Paul Sanders.
If I had more time, I would have written a shorter letter - Blaise Pascal.
Some of my best work is in the undo buffer.
|
|
|
|
|
I can't use consteval because I can't target C++20
To err is human. Fortune favors the monsters.
|
|
|
|
|
Wordle 456 3/6
🟩⬛⬛🟨⬛
🟩🟩⬛⬛⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 456 3/6
⬜⬜🟩⬜⬜
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 456 3/6
⬛⬛⬛🟨⬛
🟩⬛⬛🟨🟨
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 456 3/6
🟨⬛⬛⬛⬛
🟩⬛⬛🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 456 4/6
⬜⬜⬜🟨⬜
⬜🟨⬜🟨🟨
🟩🟩🟩⬜⬜
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
modified 18-Sep-22 3:51am.
|
|
|
|
|
I think you are cross threaded
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Dunno what happened there: I original posted this in the wrong place, but noticed, copied it, deleted it, and pasted in the right place.
Then I did Wordle, and thought I posted it's result ... maybe I got confused by a lack of caffeine / 5am start ...
Fixed now.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 456 4/6
⬜⬜⬜🟨⬜
🟨⬜⬜⬜⬜
⬜🟨🟨🟩⬜
🟩🟩🟩🟩🟩
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 456 3/6
🟨⬜🟩⬜⬜
🟨⬜🟩🟩🟩
🟩🟩🟩🟩🟩
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 456 4/6
⬛⬛⬛⬛⬛
🟨⬛⬛⬛⬛
⬛🟨🟨🟩⬛
🟩🟩🟩🟩🟩
Get me coffee and no one gets hurt!
|
|
|
|
|
<pre><?php
$database = "starter_mag";
$password = "XXXXXXX";
$username = "XXXXXXX";
$hostname = "127.0.0.1";
$link = mysqli_connect($hostname, $username, $password, $database);
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$sql = "SELECT distinct TABLE_NAME FROM Information_schema.columns where TABLE_SCHEMA = '$database' ORDER BY table_name ASC";
$offset = 10000;
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
while($row = mysqli_fetch_array($result)){
$tableName = $row['TABLE_NAME'];
$count = 0;
echo '------------------- INIT '.$tableName.' TABLE ---------------'.PHP_EOL;
do{
$tableQuery = "SELECT * FROM ".$tableName." limit ".$count*$offset.", $offset";
if($resultTableQuery = mysqli_query($link, $tableQuery)) {
if (mysqli_num_rows($resultTableQuery) > 0) {
while ($tableRow = mysqli_fetch_array($resultTableQuery)) {
echo ('('.$count.') '.$tableName.': ');
echo implode(',',$tableRow);
echo PHP_EOL;
}
}
}
$count++;
}while(mysqli_num_rows($resultTableQuery));
echo '------------------- END '.$tableName.' TABLE ---------------'.PHP_EOL;
}
mysqli_free_result($result);
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
mysqli_close($link);
modified 18-Sep-22 5:04am.
|
|
|
|
|
Wrong forum, notice the "Ask A Question?" at the top of the page.
Also give a little more description of what you've tried, what's wrong, et.. People are happy to help when they know the problem.
PartsBin an Electronics Part Organizer is finally available for download.
JaxCoder.com
|
|
|
|
|
I need to describe the functionality of this code, what it does, it's a challenge but I don't know anything about databases
|
|
|
|
|
|