【发布时间】:2014-02-14 08:40:23
【问题描述】:
别名模板的部分特化是不允许的:
例如,尝试有创意,会在 clang 中产生此错误:
template <typename T>
using unwrapped_future_t = T;
template <typename T>
using unwrapped_future_t<future<T>> = typename future<T>::value_type;
^~~~~~~~~~~
> error: partial specialization of alias templates is not permitted
为什么不允许这样做?
【问题讨论】:
标签: c++ templates c++11 template-specialization partial-specialization