相关疑难解决方法(0)

执行static_assert模板类型是另一个模板

我怎么static_assert样这个?如果没有C++或C++ 11中的新功能,Boost可能会支持它吗?

template<T>
struct foo {};

template<FooType>
struct bar {
  static_assert(FooType is indeed foo<T> for some T,"failure"); //how?
};
Run Code Online (Sandbox Code Playgroud)

c++ templates boost c++11

15
推荐指数
1
解决办法
2129
查看次数

标签 统计

boost ×1

c++ ×1

c++11 ×1

templates ×1