The value of "operator" in this C ++ expression

What does the "operator" mean in this use of C ++?

char* pszVar= W2A(_bstr_t(bstrVar).operator wchar_t*());
+3
source share
4 answers

causing the compiler to select, apparently, a specific, "convert to wchar_t *" in this class. "this class" is what is returned from the _bstr_t call.

+5
source

This is an explicit call to the conversion operator wchar_tto make sure that it will be used, and not the other.

However, this is an ugly and certainly a problem in class members.

+4
source

wchar_t*.

+3

.

0

Source: https://habr.com/ru/post/1750985/


All Articles