I’m trying to compile a C++ library (which compiles fine in g++) with Clang.
However for some reason I am getting errors everywhere I use an stl container. The error message seems to suggest it thinks I am trying to use a boost set, which I don’t think I am.
I don’t believe anywhere I somehow aliased boost as std, and I never actually use the using keyword.
/Users/zennatavares/repos/cliques/cliques/../cliques/structures/disjointset.h:140:8: error: too few template arguments for class template 'set'
std::set<int> visited_parents_;
^
/usr/local/include/boost/detail/container_fwd.hpp:90:64: note: template is declared here
template <class Key, class Compare, class Allocator> class set;
I believe that the issue is boost trying to forward declare members of namespace std, and Boost is getting the forward declaration wrong for libc++. There’s not any portable way to do such forward declarations so boost really shouldn’t be doing it. Declaring things inside namespace std results in undefined behavior.
Here’s a bug filed against boost for one of these issues. https://svn.boost.org/trac/boost/ticket/5197
If you post a complete program that reproduces the issue then perhaps we can give more detail on what exactly you can do to fix this in your case.