Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

distance_type and distance in std namespace

572828Jan 21 2011 — edited Jan 23 2011
Hi all,

The following code is compiling under windows (VS 2005):
vector<double>::iterator::distance_type n = std::distance(x,xmax);
Under unix, and using sunstudio12 and CC 5.9, I have the following error:
std::vector<double>::iterator is not a namespace or class name.
Why CC is not recognizing distance_type as a definition in iterator class? Is there an equivalent of the declaration above within CC 5.9?

Thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2011
Added on Jan 21 2011
4 comments
350 views