Fixed Trac #12920 ("movelib::unique_ptr: incorrect pointer type for nested array")

This commit is contained in:
Ion Gaztañaga
2017-04-09 13:47:36 +02:00
parent 135e598bc4
commit 67bda76dad
4 changed files with 36 additions and 2 deletions
+11
View File
@@ -75,6 +75,17 @@ void test()
typedef bml::unique_ptr<int[5], Deleter> P;
BOOST_STATIC_ASSERT((bmupmu::is_same<P::pointer, Deleter::pointer>::value));
}
//Unbounded array of bounded array unique_ptr
{
typedef int int_5_t [5];
typedef bml::unique_ptr<int_5_t[]> P;
BOOST_STATIC_ASSERT((bmupmu::is_same<P::pointer, int_5_t*>::value));
}
{
typedef int int_5_t [5];
typedef bml::unique_ptr<int_5_t[], Deleter> P;
BOOST_STATIC_ASSERT((bmupmu::is_same<P::pointer, Deleter::pointer>::value));
}
}
} //namespace unique_ptr_pointer_type {