folly::_t and use it in folly::exception_wrapper
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 4 Jan 2017 03:37:13 +0000 (19:37 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 4 Jan 2017 03:48:01 +0000 (19:48 -0800)
commit815100a0d3a73ff7800c588de288c66d920b0d6c
tree41cb49ab57b95dad3464157ed5d26d30ecd024be
parented8c80a0e0988e4ce687f51ca832a00e4a6b7930
folly::_t and use it in folly::exception_wrapper

Summary:
[Folly] `folly::_t` and use it in `folly::exception_wrapper`.

Intended in part for use in Folly code, but can be used outside.

Instead of:

```lang=c++
namespace folly {
using original = //...
using decayed = typename std::decay<original>::type;
}
```

In C++14:

```lang=c++
namespace folly {
using original = //...
using decayed = std::decay_t<original>;
}
```

And in C++11:

```lang=c++
namespace folly {
using original = //...
using decayed = _t<std::decay<original>>:
}
```

Not perfect, but better.

HT ericniebler and https://github.com/eniebler/meta.

Reviewed By: ericniebler

Differential Revision: D4371539

fbshipit-source-id: 9046d9caab73141b95f4bce4fb1af26e0c1ac739
folly/ExceptionWrapper.h
folly/Traits.h