File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
tests/beman/inplace_vector Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -134,4 +134,26 @@ TYPED_TEST(Constructors, CopyRanges) {
134134 }
135135}
136136
137+ TYPED_TEST (Constructors, freestandingConversion) {
138+ using T = TestFixture::T;
139+
140+ using IV = beman::inplace_vector<T, 5 >;
141+ using FS = beman::freestanding::inplace_vector<T, 5 >;
142+
143+ static_assert (std::is_constructible_v<FS, FS>);
144+ static_assert (std::is_constructible_v<IV, IV>);
145+ static_assert (!std::is_constructible_v<IV, FS>);
146+ static_assert (!std::is_constructible_v<FS, IV>);
147+
148+ static_assert (std::is_assignable_v<IV, IV>);
149+ static_assert (std::is_assignable_v<FS, FS>);
150+ static_assert (!std::is_assignable_v<FS, IV>);
151+ static_assert (!std::is_assignable_v<IV, FS>);
152+
153+ static_assert (std::is_convertible_v<FS, FS>);
154+ static_assert (std::is_convertible_v<IV, IV>);
155+ static_assert (!std::is_convertible_v<IV, FS>);
156+ static_assert (!std::is_convertible_v<FS, IV>);
157+ }
158+
137159}; // namespace
You can’t perform that action at this time.
0 commit comments