On February 8, 2016 11:11:35 PM Orcan Ogetbil wrote: > Hi all, > With Robert's help, I was able to push the build dependency fix to trunk. > > There were a few c++14 related failures which I wanted to address. > Fortunately most of them seem already fixed. There is one remaining > issue in lv2host.cpp. > > In gcc6, which is about to be released, the default mode is > -std=gnu++14, which incorporates c++14 features. c++14 comes with some > API changes in the standard library. > > There are multiple uses of std::make_pair<T1, T2>(x, y) in > lv2host.cpp. As you can see in [1], the default signature of this > function changed in c++11 and later. It now takes rvalue references as > input. See [2] if you are not familiar with rvalue references for a > brief introduction. The main purpose of this function is now to deduce > the types without a need to provide the template arguments. > > Bare usage of > std::make_pair<T1, T2>(x, y) > results in cast errors. My suggestion is to use > std::make_pair(x, y) > to take advantage of the new move semantics, or use the good old > std::pair<T1, T2>(x, y) > to use copy semantics. > > Since I wasn't entirely sure what is the intended way (i.e. whether > moving is harmless) in the code, I wanted to bring this into your > attention. > > If you don't have access to gcc6; but you have a recent enough gcc, > you can test the build by adding -std=gnu++14 to your compiler flags. > I believe -std=gnu++11 should also give the same build error but I > didn't test. > > Let me know if you have any questions. > > Cheers, > Orcan > > [1] http://en.cppreference.com/w/cpp/utility/pair/make_pair > [2] http://thbecker.net/articles/rvalue_references/section_03.html
Hi Orcan. I too want to switch to C++11 or even 14. For the new atomic classes. And a /lot/ of other stuff we miss out. I hope we would all agree it is long overdue to switch. I'm sooo tired of C++98. I've been aware of all the new stuff for a while. But I just read about some of the actual API prototype changes the other night, which I was not aware of. I remember turning on C++11 once, but it failed. I was kind of dreading what I might be in for, if I turned it on again. Must we add the -std=gnu++11 flags to each module? Or is there a way to tell (the top level) cmake to do it all for us? I haven't pulled for a few days - are you saying it's already been done? Thanks. Tim. ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Lmuse-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmuse-developer
