
On 11/3/2010 7:04 PM, Hugh Dickinson wrote:
From the error message, I'm guessing that you are adapting a struct to fusion. Fusion is not picking the right overload for your struct. In the second case, you are in the right namespace and ADL is kicking in just fine. Try providing a<< overload in the namespace of your struct.
Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
Hi Joel, thanks for the reply. I don't really understand what you mean, could you explain in a bit more detail. I would have thought that since PMT::QE::DataSet is a fusion sequence, then the overload defined in boost/fusion/sequence/io/detail/out.hpp should have been selected.
Fusion relies on its elements having an operator<< available through ADL. It does not really care if the elements are themselves fusion elements. It only cares that an operator<< can be found for each of its elements. In your case, ADL looks for an operator<< in PMT::QE::DataSet, not in fusion. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net