Boost logo

Boost Users :

Subject: [Boost-users] [lexical_cast] Why isn't boost::lexical_cast bijective?
From: Egor Tensin (egor.tensin_at_[hidden])
Date: 2014-02-18 12:17:03

Why this works:

boost::lexical_cast<std::string>((void *) 42UL)

and this throws:

boost::lexical_cast<void*>(boost::lexical_cast<std::string>((void*) 42UL))

while converting void* to std::string and vice versa works perfectly
using std:: streams?

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