3 ms·
Looks like that's too complicated. This is what godbolt.org shows the output at (if you add the missing #include <utility> and pick "trunk" for gcc): <sour
by vidarh 9y ago
Looks like that's too complicated. This is what godbolt.org shows the output at (if you add the missing #include <utility> and pick "trunk" for gcc):
<source>: In function 'void test(foo*)':
<source>:16:16: error: 'int foo::m_x' is private within this context
if (ptr->m_x >= 3)
^~~
<source>:9:11: note: declared private here
int m_x;
^~~
Compiler returned: 1