Hi,
The first code snippet in the dictionary example contains the following
function:
void foo(adobe::dictionary_t param) // makes a copy of the dictionary_t
{
std::cout << param[adobe::name_t("my_key")].get<std::string>();
}
If I understand the characteristics of name_t correctly the usage of a
tempory name_t here is, well suboptimal. The construction is O(n) where
n is the number of distinct name_t values in the process. I am aware
that name_t usage is not the point here, but this particular usage looks
so natural that it might be worthwile to avoid misleading the programmer
even in unrelated examples.
Just my 2ct
Thomas
--
Thomas Witt
wi...@ac...
|