Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost-users Digest, Vol 3844, Issue 1
From: Seeger, Steven D. (GSFC-444.0)[Embedded Flight Systems, Inc] (steven.seeger_at_[hidden])
Date: 2014-07-05 11:54:37


>Date: Sun, 29 Jun 2014 13:21:21 -0300 >From: Agust?n K-ballo Berg? <kaballo86_at_[hidden]> >To: boost-users_at_[hidden] >Subject: Re: [Boost-users] [fusion] maps and arrays >Message-ID: <BLU436-SMTP192734464D2B326EAF70973A7050_at_phx.gbl> >Content-Type: text/plain; charset="ISO-8859-1"; format=flowed >I missed the part where `for_each` was invoking the callable on each >element of the array, that is not how it is supposed to be. You are >right that making a recursive callable is the correct way to obtain that >behavior. Hi Agustin I'm sorry for taking so long to reply to you. I've been swamped. I really appreciate you taking the time to have this discussion with me and helping me to see that the behavior I was experiencing before with the for_each stepping into each array item is not correct. I should remember in the future to try and understand from the documentation what something is doing and not just by empirically testing it. >Without any other information on the error you get, I'm betting that >this is due to adding support for C++11 (not-so) perfect forwarding: > void foo(std::array<int, 2> const&){} > template <typename T> > void bar(T&& v){ foo(std::forward<T>(v)); } > foo({3,4}); // ok > bar({3,4}); // error: {3,4} has no type If I get some time I will play with this. I think that it is a bug that I cannot use braced initializer in c++11 with 1.55 like I could in 1.53. In the meantime I am adding a comment and referencing this discussion to my bug report to show that it is not a bug. I imagine they are not interested in the 1.53 issue we may have uncovered. Regards, Steven


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net