This avoids using boost::declval inside evaluated contexts, which is invalid
and will actually be diagnosed by compilers [1] when the type used inside
boost::declval has internal linkage (such as an anonymous namespace).
[1]: https://bugs.llvm.org/show_bug.cgi?id=35842