c – 使用gcc的boost :: variant链接器错误
发布时间:2020-12-16 07:31:18 所属栏目:百科 来源:网络整理
导读:我想弄清楚以下为什么不能编译,我有点疯狂: #include iostream#include array#include boost/variant.hpp#include forward_listtypedef unsigned long long very_long;typedef boost::variant int,std::string variants_type;typedef std::array variants_t
我想弄清楚以下为什么不能编译,我有点疯狂:
#include <iostream> #include <array> #include <boost/variant.hpp> #include <forward_list> typedef unsigned long long very_long; typedef boost::variant< int,std::string > variants_type; typedef std::array< variants_type,5 > row_type; typedef std::forward_list<row_type> rows_holder_type; int main() { rows_holder_type rows; row_type row_data; row_data[0] = 0; row_data[1] = 0; row_data[2] = 0; row_data[3] = 0; row_data[4] = 0; rows.push_front(row_data); } 这是我得到的编译器错误:
|