Click here to Skip to main content
15,885,365 members

Comments by NoviceEx (Top 1 by date)

NoviceEx 18-Jun-21 9:56am View    
and I was not able to do that, probably I do not get something

if I use std::find_if then I can do it

const auto& found = std::find_if(dataArray.begin(),
dataArray.end(),
[&Id](const MyData &md) { return md.id == Id; } );
if( found == dataArray.end() )
return Id;

How to do that with std::adjacent_find()?