Re: [Development] QPair vs std::pair difference with narrowing conversion

2023-06-03 Thread Elvis Stansvik
Den lör 3 juni 2023 kl 15:08 skrev Giuseppe D'Angelo : > > > > Il sab 3 giu 2023, 14:37 Elvis Stansvik ha scritto: >> >> Hi all, >> >> I was going through some legacy code and came across a behavioral >> difference between QPair and std::pair: >> >> estan@edison:~$ cat test.cpp >> #include >> #in

Re: [Development] QPair vs std::pair difference with narrowing conversion

2023-06-03 Thread Giuseppe D'Angelo
Il sab 3 giu 2023, 14:37 Elvis Stansvik ha scritto: > Hi all, > > I was going through some legacy code and came across a behavioral > difference between QPair and std::pair: > > estan@edison:~$ cat test.cpp > #include > #include > > int main(void) { >int i = 1; >QPair{i, i}; >std::p

[Development] QPair vs std::pair difference with narrowing conversion

2023-06-03 Thread Elvis Stansvik
Hi all, I was going through some legacy code and came across a behavioral difference between QPair and std::pair: estan@edison:~$ cat test.cpp #include #include int main(void) { int i = 1; QPair{i, i}; std::pair{i, i}; return 0; } estan@edison:~$ g++ -isystem /usr/include/x86_64-li