On Wed, Jul 25, 2012 at 01:10:24PM +0100, Toby Gray wrote:
> On 17/07/12 04:56, Chris Frey wrote:
> > I think it's better to go in the other direction.  For systems that don't
> > have tr1, then:
> >
> > namespace std {
> >     namespace tr1 {
> >             using boost::shared_ptr;
> >     }
> > }
> >
> > I hope that's possible. :-)  It might even prevent the need to bump to 0.19.
> 
> I've asked a C++ standards guru and adding to namespace std is undefined 
> behaviour. From the C++11 standard section 17.6.4.2.1:
> " The behavior of a C++ program is undefined if it adds declarations or 
> definitions to namespace std or to a
> namespace within namespace std unless otherwise specified"
> 
> However the WinCE build needs to use STLPort anyway for the 
> implementation of the std namespace. STLPORT does a #define on "std" so 
> this should all be ok. I'll let you know once I've tried it and updated 
> my branch if it does work.

Thanks. :-)  If that doesn't work, maybe we need to create our own
Barry::tr1 namespace, and just import std or boost into it.  I'm sure
that would be a v0.19.0 ABI change though.



> Regarding the struct vs. class, there's a question on Stackflow about 
> what the standard says, which seems to conclude that it shouldn't matter:
> http://stackoverflow.com/questions/4866425/mixing-class-and-struct
> 
> The important part though is that the name mangling that Visual Studios 
> does uses 'U' to mean struct and 'V' to mean class ( 
> http://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B_Name_Mangling#Data_Type).

I've tested those two changes, and it doesn't affect ABI compatibility
on Linux, so I've merged those patches as well.

Thanks!
- Chris


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to