Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试编写一个需要带有gcc 6的概念Container的类。
我尝试的是:
class MyContainer { ... }; static_assert(std::Container<MyContainer>);
但我无法让它编译。
概念 TS 中没有任何实际概念。这只是语言功能。C++ 标准使用的“概念”不是由 Concepts TS 实现的。
所以std::Container你试图访问的这个不存在。您可以阅读标准使用的要求并创建一个。
std::Container