This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sun, 7 Jun 2015, Ville Voutilainen wrote:
On 7 June 2015 at 11:12, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:Does the following code still compile with your patch? struct A { int a,b; }; std::tuple<int,int,A> a(3,4,{1,2});No. :/ And we have no test for it.. I'll need to look at that.Ahem, yes, this is because the constructor that used to take _Elements now takes _UElements. I can change it back to take _Elements, because the technique that the default constructors use allow making the signature dependent enough that it will sfinae correctly.
Yes.
You use a lot: typename enable_if<X, bool>::type=true while the current code seems to favor: class=typename enable_if<X>::type. I don't really care which one is used, but it is easier to read when the style is consistent through the library.It's not a style issue. That template parameter needs to be a non-type one, otherwise the overloads are ambiguous.
Ah, I had overlooked that. I have seen several work-arounds for this issue, but I don't remember this one, it seems nice.
-- Marc Glisse
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |