diff options
Diffstat (limited to 'libcxx/test/containers/associative/set/emplace_hint.pass.cpp')
-rw-r--r-- | libcxx/test/containers/associative/set/emplace_hint.pass.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/test/containers/associative/set/emplace_hint.pass.cpp b/libcxx/test/containers/associative/set/emplace_hint.pass.cpp index be5d73dac93..8e7fbbc4033 100644 --- a/libcxx/test/containers/associative/set/emplace_hint.pass.cpp +++ b/libcxx/test/containers/associative/set/emplace_hint.pass.cpp @@ -19,6 +19,7 @@ #include "../../Emplaceable.h" #include "../../DefaultOnly.h" +#include "../../min_allocator.h" int main() { @@ -67,5 +68,16 @@ int main() assert(m.size() == 1); assert(*r == 2); } +#if __cplusplus >= 201103L + { + typedef std::set<int, std::less<int>, min_allocator<int>> M; + typedef M::iterator R; + M m; + R r = m.emplace_hint(m.cend(), M::value_type(2)); + assert(r == m.begin()); + assert(m.size() == 1); + assert(*r == 2); + } +#endif #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES } |