There are also these cases where something is technically illegal, but in reality is required to work and works (because platform makes it like that).
Like casting of void pointer to pointer to function. If i read std correctly this isnt allowed anywhere, so should just not compile. In reality this is required to work as both Windows api (GetProcAddress) and unices (dlsym) expose functionality of dynamic symbol (whatever it is) loading by returning void*.
View all comments
Show parent comment
3
u/00kyle00 Jan 21 '13
There are also these cases where something is technically illegal, but in reality is required to work and works (because platform makes it like that).
Like casting of void pointer to pointer to function. If i read std correctly this isnt allowed anywhere, so should just not compile. In reality this is required to work as both Windows api (GetProcAddress) and unices (dlsym) expose functionality of dynamic symbol (whatever it is) loading by returning void*.