otcshare / automotive-message-broker

Other
47 stars 48 forks source link

build issue with std c++11 #62

Closed slssun007 closed 8 years ago

slssun007 commented 8 years ago

automotive-message-broker-master/lib/listplusplus.h:30:85: error: parameter declared ‘auto’ return std::any_of(iteratable.begin(), iteratable.end(), [value, &comparator](auto i) { return comparator(value, i); });

petr-nechaev commented 8 years ago

You can try looking at https://github.com/otcshare/automotive-message-broker/commit/d4f0c746dc1d4dc9226f16b6bd463e7ef3c57994. My fix was: https://github.com/CogentEmbedded/automotive-message-broker/commit/fb401094c3d88da14e1b909d786a86c3a68d2199

tripzero commented 8 years ago

"auto" inside lamdas is a c++14 feature. AMB 0.14 uses the same style @petr-nechaev is using. The bug may be not using -std=c++14. I'll check.

tripzero commented 8 years ago

Looks like we are using -std=c++1y[1]. Your compiler may support some c++14 features, but perhaps is missing this one. What version of gcc are you using?

[1] - https://github.com/otcshare/automotive-message-broker/blob/master/CMakeLists.txt#L55

slssun007 commented 8 years ago

Thanks its working fine with petr-nechaev style.

On Fri, 30 Oct 2015 22:39 Kevron Rees notifications@github.com wrote:

Looks like we are using -std=c++1y[1]. Your compiler may support some c++14 features, but perhaps is missing this one. What version of gcc are you using?

[1] - https://github.com/otcshare/automotive-message-broker/blob/master/CMakeLists.txt#L55

— Reply to this email directly or view it on GitHub https://github.com/otcshare/automotive-message-broker/issues/62#issuecomment-152588978 .

slssun007 commented 8 years ago

Thanks its working fine with petr-nechaev style.