I usually consider this to be a language restriction, and advise people that — unless they really know what they’re doing — they should just reimplement. In the vast majority of cases, these functions are simple one-line getters, so there’s no pain.
In your capacity of teaching C++ I would feel even more strongly about this approach.