File indexing completed on 2026-04-09 07:49:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <string>
0022 #include <csignal>
0023 #include "SMap.hh"
0024
0025 #include "SYSRAP_LOG.hh"
0026 #include "OPTICKS_LOG.hh"
0027
0028 int main(int argc, char** argv)
0029 {
0030 OPTICKS_LOG(argc, argv);
0031
0032 typedef std::string K ;
0033 typedef unsigned long long V ;
0034
0035 std::map<K,V> m ;
0036
0037 V v = 0xdeadbeefdeadbeefull ;
0038
0039 m["hello"] = v ;
0040 m["world"] = v ;
0041 m["other"] = 0x4full ;
0042 m["yo"] = 0xffffull ;
0043
0044
0045 unsigned nv = SMap<K,V>::ValueCount(m, v) ;
0046
0047 bool nv_expect = nv == 2 ;
0048 assert( nv_expect );
0049 if(!nv_expect) std::raise(SIGINT);
0050
0051 bool dump = true ;
0052
0053 std::vector<K> keys ;
0054 SMap<K,V>::FindKeys(m, keys, v, dump ) ;
0055
0056 assert( keys.size() == 2 ) ;
0057
0058
0059 return 0 ;
0060 }