Boost logo

Boost Users :

From: Sudarshan Gaikaiwari (sudarshan_at_[hidden])
Date: 2007-10-18 21:32:16


Hi

The boost regex library makes liberal use of &*string.begin()

For example

----------------------------------------------------------------------------------------
   std::string result(++bytes, '\0');
   bytes = ::LCMapStringW(
      id, // locale identifier
      LCMAP_SORTKEY, // mapping transformation type
      p1, // source string
      static_cast<int>(p2 - p1), // number of characters in source string
      reinterpret_cast<wchar_t*>(&*result.begin()), // destination
buffer *of bytes*
      bytes // size of destination buffer
      );
--------------------------------------------------------------------------------------------------------------------

Is this construct safe? Are its semantics specified by the standard?

regards
Sudarshan

-- 
Sudarshan Gaikaiwari
www.sudarshan.org
sudarshan_at_[hidden]

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net