Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2004-04-30 23:34:04

Miro Jurisic <macdev_at_[hidden]> writes:

> In article
> <CF5A888BE3E8BC41AE0B18ABE60C4D47028DF6AB_at_[hidden]>,
> "DY, JERRY U (SBCSI)" <jd2419_at_[hidden]> wrote:
>> string s2 = lexical_cast<string>((int)c) // s2 = "65"
> I would have written int(c) instead of (int)c because compilers perform more
> useful checking on the constructor than they do on the cast, but that's all.

The two forms are equivalent.

Dave Abrahams
Boost Consulting

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at