1 2 // Copyright 2012 Daniel James. 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #include "template.hpp" 7 #include <cassert> 8 #include <boost/unordered_set.hpp> 9 main()10int main() 11 { 12 typedef my_pair<int, float> pair; 13 boost::unordered_set<pair> pair_set; 14 pair_set.emplace(10, 0.5f); 15 16 assert(pair_set.find(pair(10, 0.5f)) != pair_set.end()); 17 assert(pair_set.find(pair(10, 0.6f)) == pair_set.end()); 18 } 19