| 24 | using ::google::protobuf::Arena; |
| 25 | |
| 26 | TEST(UsesAllocatorConstructor, constructible_with_raw_args) { |
| 27 | struct S { |
| 28 | S() = default; |
| 29 | S(int) { |
| 30 | v = 1; |
| 31 | } |
| 32 | int v {0}; |
| 33 | } s; |
| 34 | ASSERT_TRUE((Constructible<S, ::std::allocator<void>, int>::value)); |
| 35 | ASSERT_FALSE((Constructible<S, ::std::allocator<void>, int>::USES_ALLOCATOR)); |
| 36 | ASSERT_FALSE((Constructible<S, ::std::allocator<void>, int, int>::value)); |
| 37 | ASSERT_FALSE( |
| 38 | (Constructible<S, ::std::allocator<void>, int, int>::USES_ALLOCATOR)); |
| 39 | s.~S(); |
| 40 | UsesAllocatorConstructor::construct(&s, ::std::allocator<void>(), 2); |
| 41 | ASSERT_EQ(1, s.v); |
| 42 | } |
| 43 | |
| 44 | TEST(UsesAllocatorConstructor, constructible_with_allocator) { |
| 45 | struct S { |
nothing calls this directly
no test coverage detected