[vtk-developers] std::auto_ptr replacement for modern compilers.

Andrew Maclean andrew.amaclean at gmail.com
Mon Jun 20 19:34:07 EDT 2016


Ben, David,

This is a much better suggestion than a try compile. I'll create a topic
for this.

Thanks
   Andrew

On Tue, Jun 21, 2016 at 12:59 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> On Mon, Jun 20, 2016 at 8:17 AM, Ben Boeckel <ben.boeckel at kitware.com>
> wrote:
>
>>
>> and our copy already has it:
>>
>>
>> https://gitlab.kitware.com/third-party/jsoncpp/blob/master/src/lib_json/json_reader.cpp#L46
>
>
> I'm fond of simple solutions like that.  Since we know it works, we could
> add the following to vtkConfigure.h.in, which is easier than adding a
> try-compile:
>
> #if __cplusplus >= 201103L || (defined(_CPPLIB_VER) && _CPPLIB_VER >= 520)
> #define VTK_HAS_STD_UNIQUE_PTR
> #endif
>
> Those three source files can use this in order to avoid the compiler
> warning (i.e. by using std::unique_ptr when available).
>
> I don't think we should actively encourage the use of std::unique_ptr
> yet.  That can wait until we're ready to abandon the old compilers.
>
>  - David
>



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160621/0cba4dfe/attachment.html>


More information about the vtk-developers mailing list