Question: In another post was mentioned this doesn't work due to the different deleter types.

```
std::unique_ptr<char[]> ptr(nullptr);
std::unique_ptr<const char[]> ptr_2(std::move(ptr));

```

But there was no solution to achieve this behavior in VSS2013. Does somebody know a short and clean solution?

Edit::

```
std::unique_ptr<const char[]> ptr_2(ptr.release());

```

doesn't work and compiles with the error:

```
error C2280: 'std::unique_ptr<const char [],std::default_delete<_Ty>>::unique_ptr<char*>(_Ptr2)' : attempting to reference a deleted function
1>          with
1>          [
1>              _Ty=const char []
1>  ,            _Ptr2=char *
1>          ]
1>          C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(1612) : see declaration of 'std::unique_ptr<const char [],std::default_delete<_Ty>>::unique_ptr'
1>          with
1>          [
1>              _Ty=const char []
1>          ]

```

Answer: 
The wording in the published C++ standard says that conversions involving changes in const-qualification are not allowed for `unique_ptr<T[]>`. This is a defect, [DR 2118](http://cplusplus.github.io/LWG/lwg-defects.html#2118), which was resolved by the changes in [N4089](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4089.pdf).

Older compilers may not implement the new rules (I implemented an earlier version of the fix for GCC 4.8, but GCC didn't support it before then either).
You can always release:

```
std::unique_ptr<const char[]> ptr_2(ptr.release());

```

But be sure to add a comment pointing out why a simple move doesn't work.