diff --git a/projects/SelfTest/ToStringVector.cpp b/projects/SelfTest/ToStringVector.cpp index 002d8ef4..eafe886d 100644 --- a/projects/SelfTest/ToStringVector.cpp +++ b/projects/SelfTest/ToStringVector.cpp @@ -27,8 +27,14 @@ namespace { /* Minimal Allocator */ template struct minimal_allocator { - typedef T value_type; - typedef std::size_t size_type; + using value_type = T; + using size_type = std::size_t; + + minimal_allocator() = default; + template + minimal_allocator(const minimal_allocator&) {} + + T *allocate( size_type n ) { return static_cast( ::operator new( n * sizeof(T) ) ); } @@ -52,8 +58,8 @@ TEST_CASE( "vector -> toString", "[toString][vector,allocator][c+ } TEST_CASE( "vec> -> toString", "[toString][vector,allocator][c++11][.]" ) { - typedef std::vector > inner; - typedef std::vector vector; + using inner = std::vector>; + using vector = std::vector; vector v; REQUIRE( Catch::toString(v) == "{ }" ); v.push_back( inner { "hello" } );