|
Boost Users : |
Subject: Re: [Boost-users] [fusion] Adapted struct I/O
From: Mateusz Åoskot (mateusz_at_[hidden])
Date: 2011-11-03 07:19:26
Hi Nathan,
2011/11/3 Nathan Crookston <nathan.crookston_at_[hidden]>:
> 2011/11/2 Mateusz Åoskot <mateusz_at_[hidden]>:
>> On 3 November 2011 00:41, Vicente J. Botet Escriba
>> <vicente.botet_at_[hidden]> wrote:
>>> try adding
>>>
>>> #include <boost/fusion/include/io.hpp>
>>>
>>> It is at the end of
>>
>>
>> It is there. See my example above.
>
> While io.hpp includes the appropriate operator<<, it defines it in
> namespace fusion and fusion::operators. Â Since the code generated from
> struct adaptation appears to reside in fusion::traits and
> fusion::extension, I'm guessing that adapted structs don't have ADL
> kicking in. Â Placing a 'using boost::fusion::operators::operator<<;'
> declaration in namespace demo is one way to fix the problem.
Spot on. Works. Thanks!
Not sure if I missed it while reading the docs, or the docs
don't mention this trick.
Best regards,
-- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net