The following code is valid:
#if 1
#include
error: ‘unwrap_ref’ is not a member of ‘std::tr1’
So I started to ask myself: WTF?
* It turns out that unwrap_ref did not make it to TR1, although
reference_wrapper did.
But why?
* Because ref.hpp did not provide it when TR1 was formed? [1]
Implication:
* unwrap_ref (std:: reference wrapper) is a mismatch.
#if 1
void test () {
unwrap_ref (::boost ::cref (0));
unwrap_ref (::std ::tr1 ::cref (0)); // error: ‘unwrap_ref’ was not
declared in this scope
::boost ::unwrap_ref (::std ::tr1 ::cref (0)); // error: error:
invalid initialization of non-const reference
}
#endif
Shouldn't we do something about it? Like, e.g., extend the scope of
unwrap_ref to cover the corresponding standard class?
This would at least allow expression #3.
Chris
___
[1]