File indexing completed on 2026-04-09 07:49:14
0001
0002
0003 #include <iostream>
0004 #include <vector>
0005 #include "S4.h"
0006
0007 struct Demo
0008 {
0009 std::string name ;
0010 const std::string& GetName() const { return name ; }
0011 };
0012
0013
0014 int main(int argc, char** argv)
0015 {
0016 std::vector<Demo> dd ;
0017 dd.push_back( Demo {"Red"} );
0018 dd.push_back( Demo {"Green"} );
0019 dd.push_back( Demo {"Blue"} );
0020 for(unsigned i=0 ; i < dd.size() ; i++)
0021 {
0022 std::cout
0023 << " d.GetName " << dd[i].GetName()
0024 << " S4::Name(d) " << S4::Name<Demo>(&dd[i])
0025 << std::endl
0026 ;
0027 }
0028
0029
0030 return 0 ;
0031 }