Implement operator<< for STL containers to debug boost::spirit semantic attrs?

Debugging Boost::Spirit Grammars with STL Containers

To debug Boost::spirit grammars using BOOST_SPIRIT_DEBUG and BOOST_SPIRIT_DEBUG_NODE, it is necessary to provide operator<< implementations for STL containers and boost::flyweights::flyweight<std::vector<something> >.

Where should one implement these operators, since it is “frowned upon” to do so in the std namespace?

The operators << for STL containers and boost::flyweights::flyweight<std::vector> should be implemented in a custom namespace. It is generally recommended to create a separate namespace specifically for these operators.