I have a basic question about arithmetic inserts; Β§ 27.7.3.6.2 / 1 [ostream.inserters.arithmetic]:
When val is of type bool, long, unsigned long, long long, unsigned long long, double, long double or const void *, formatting occurs as if it were executing the following code fragment:
bool failed = use_facet< num_put<charT,ostreambuf_iterator<charT,traits> > > (getloc()).put(*this, *this, fill(), val).failed()
The question is, which function performs the conversion from a pointer to a type, as Matt McNabb corrected, const void* ? For instance:
int *ip = new int(1); std::cout << ip;
I'm not interested in implementation details, I just wanted to know which function produces the arithmetic result from the pointer. Is it put in the above example?
user2953119
source share