c++ - how to convert protobuf repeated message to std::set -


my message defines this

message connection {   optional string id                      = 1;   ... }  message configurations  {   repeated connection connections = 1;   ... } 

there 2 configurations, , want union\intersection\difference, plan convert repeated message std::set, this:

bool comp(const connection &first, const connection &sec) {     return first.id() < sec.id(); } std::set <connection, comp> new_set(     conf.connections().begin(), conf.connections().end()); 

but not work, tried other ways, failed. fresh man cpp, think coming stackoverflow more effective way. tips? thanks.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -