// { dg-options "-std=gnu++17" } // { dg-do compile { target c++17 } } #include #include #include using __gnu_test::SimpleAllocator; using value_type = std::multiset::value_type; static_assert(std::is_same_v< decltype(std::multiset{1, 2, 3}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{1, 2, 3}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{{1, 2, 3}, std::less{}, {}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{{1, 2, 3}, {}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{{1, 2, 3}, SimpleAllocator{}}), std::multiset, SimpleAllocator>>); static_assert(std::is_same_v< decltype(std::multiset{{1, 2, 3}, {}, SimpleAllocator{}}), std::multiset, SimpleAllocator>>); void f() { std::multiset x; static_assert(std::is_same_v< decltype(std::multiset(x.begin(), x.end())), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::less{}, std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::less{}, {}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset(x.begin(), x.end(), {})), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), SimpleAllocator{}}), std::multiset, SimpleAllocator>>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), {}, std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), {}, SimpleAllocator{}}), std::multiset, SimpleAllocator>>); } using __gnu_test::test_container; using __gnu_test::input_iterator_wrapper; void g() { value_type array[1]; test_container x(array); static_assert(std::is_same_v< decltype(std::multiset(x.begin(), x.end())), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::less{}, std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::less{}, {}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset(x.begin(), x.end(), {})), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), SimpleAllocator{}}), std::multiset, SimpleAllocator>>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), {}, std::allocator{}}), std::multiset>); static_assert(std::is_same_v< decltype(std::multiset{x.begin(), x.end(), {}, SimpleAllocator{}}), std::multiset, SimpleAllocator>>); }