which compiler are you using in Mbed Studio?
See my answer here: Embedded, Mbed OS & Smart pointers - #5 by ladislas