[cfe-dev] Using unique_ptr in both C++03 and C++11 mode?

David Chisnall David.Chisnall at cl.cam.ac.uk
Mon Jul 27 07:41:16 PDT 2015


On 27 Jul 2015, at 15:37, Jeffrey Walton <noloader at gmail.com> wrote:
> 
> On Mon, Jul 27, 2015 at 10:37 AM, David Chisnall
> <David.Chisnall at cl.cam.ac.uk> wrote:
>> On 27 Jul 2015, at 15:23, Jeffrey Walton <noloader at gmail.com> wrote:
>>> 
>>> How do we manage auto_ptr/unique_ptr on Apple platforms under Clang?
>>> What is the secret sauce I am missing?
>> 
>> Why are you trying to special-case __APPLE__ at all?  You might want to have different things for libstdc++ / libc++, but that’s not an Apple/everyone else distinction.
> 
> Because Apple fiddles with things. I.e., its broke without the Apple
> defines, too.

Do you have test cases for this?  I’ve not encountered any problems moving C++ code between OS X and FreeBSD, the only time I need portability #defines is when I also want to move it to a platform where libstdc++ is the default C++ standard library implementation.

David





More information about the cfe-dev mailing list