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.
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).
Regards,
Toby
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/barry-devel