http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57524
--- Comment #2 from James Michael DuPont <JamesMikeDuPont at googlemail dot com> --- Here is a small change to work around the crash : namespace boost { namespace detail { namespace variant { struct variant_hasher: public //boost:: static_visitor<std::size_t> { template <class T> std::size_t operator()(T const& val) const { //using namespace boost; hash<T> hasher; return hasher(val); } }; }} } It is the uneeded namespace usage that causes the problem.