1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <set> 10 11 // class set 12 13 // explicit set(const value_compare& comp) const; 14 // value_compare and key_compare are the same type for set/multiset 15 16 // key_compare key_comp() const; 17 // value_compare value_comp() const; 18 19 #include <set> 20 #include <cassert> 21 22 #include "test_macros.h" 23 #include "../../../test_compare.h" 24 main(int,char **)25int main(int, char**) 26 { 27 typedef test_compare<std::less<int> > C; 28 const std::set<int, C> m(C(3)); 29 assert(m.empty()); 30 assert(m.begin() == m.end()); 31 assert(m.key_comp() == C(3)); 32 assert(m.value_comp() == C(3)); 33 34 return 0; 35 } 36