mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
e0fa025e18
new_ [1] took a const reference for each of its parameters. Unfortunately, that adds const-ness even when the constructor needs non-constness. Unfortunately, the other way (turning off constness) can lead to excess copying. According to the Forwarding Problem [2], there is no great solution here. C++ does not have a perfect way to write a function which wraps another function. So we settle for non-constness, and we must rely on forbidding copying of expensive objects. [1] as in cx->new_<T>(p1) [2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm |
||
---|---|---|
.. | ||
ipc | ||
jetpack | ||
jsd | ||
src |