$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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]