强制 std::tuple 包含 std::p air<fixed_type, T>
Forcing std::tuple to contain std::pair<fixed_type, T>
是否可以使用"部分专用"的std::tuple
,使其包含具有不同T的std::pair<fixed_t, T>
?
UPD:元组应该包含对。因此,它相当于将一个fixed_t
的数组与一个正则std::tuple
一起使用。
使用可变临时别名和参数包扩展:
template<typename... Types>
using fixed_tuple = std::tuple< std::pair<fixed_t, Types>... >;
活生生的例子。
相关文章:
- 在 QVector<std::unique_ptr 上使用 std::find<Type>>
- std::unordered_map 类型对象声明期间出现"field has incomplete type"错误
- C++ "错误:在'类 std::result_of< ... >"中没有名为'type'的类型"
- 如何解决"'mutex' in namespace 'std' does not name a type"?
- 如何摆脱导入的 make 项目中的 Eclipse 索引器"Type std::... could not be resolved"错误
- clang C++17 std::vector over align type 使用 -mavx 编译时元素 SIGSE
- std::make_shared<Type> 会产生内存泄漏
- 使用 std::type T 的数组来构造可从 T 构造的 std::数组
- 在 std::vector<std::vector 中重新存储内部向量<TYPE>>
- 检测<T>某些非数字类型 T 的 std::numeric::type 的特化
- 修复第三方代码:"error: ‘enable_if’ in namespace ‘std’ does not name a template type"
- 错误 C2893 无法专门化函数模板'unknown-type std::invoke(_Callable &&,_Types &&...)'
- 无法专用化函数模板'unknown-type std::invoke(_Callable &&,_Types &&...) noexcept(<expr>)'
- 初始化有关Google C 样式指南的静态字符串(C-Type或STD :: String)
- 使用 std::array<Type, N> 的实例作为模板参数
- "The C++ Library doesen't provide a hash for this type." - 在 std::unordered_map 中使用自己的类
- 防止编码器错误 - 忘记在"std::enable_if<>::type"中添加"::type" (SFINAE)
- whats type*在表达式std :: enable_if中
- C++ "using std::<type>" vs 呼叫 std::<type> 每次
- 为什么使用std::type_index而不是std::type _info*