lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Delegating ctor uncalled for?


From: Greg Chicares
Subject: Re: [lmi] Delegating ctor uncalled for?
Date: Thu, 9 Feb 2017 17:14:10 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

On 2017-02-09 16:45, Vadim Zeitlin wrote:
> On Thu, 9 Feb 2017 03:50:01 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> On 2017-02-04 15:23, Vadim Zeitlin wrote:
> ..
> GC> >  It's still simple enough to make a mistake with the order of these 5
> GC> > arguments. Maybe I just make too many mistakes, but I really appreciate
> GC> > APIs which prevent me from making them, so I'd strongly prefer to be 
> able
> GC> > to write
> GC> > 
> GC> >         InputSequence sequence
> GC> >                 (expression
> GC> >                 ,InputParameters()
> GC> >                         .years_to_maturity(y2m)
> GC> >                         .issue_age(ia)
> GC> >                         .retirement_age(ra)
> GC> >                         .inforce_duration(id)
> GC> >                         .effective_year(ey)
> GC> >                 );
> GC> 
> GC> but introducing a dependency on yet another library to accomplish this
> GC> is not so good
> 
>  I might write another reply with some less trivial comments later, but for
> now I just wanted to clarify what looks like a misunderstanding to me: the
> syntax above does _not_ require any third-party libraries and can, and
> should, be implemented directly in InputParameters class itself, just as
> it's done in e.g. wxFontInfo (which can be used to construct a wxFont
> without checking the order of its parameters in the documentation).

That compiles?

I guess it must, because we already have:

    // Use a standard PDF Helvetica font (without embedding any custom fonts in
    // the generated file, the only other realistic choice is Times New Roman).
    pdf_dc.SetFont
        (wxFontInfo(8).Family(wxFONTFAMILY_SWISS).FaceName("Helvetica")
        );

Is this some new C++11 feature that I had never heard of, or some
old feature that I'm too tired to recognize right now?

Is it what they're talking about here
  
http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99
? If so, is it a C99 feature that isn't C++11 yet is supported
by gcc even with '-std=c++11'?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]