0.11.13 compat

ref #90
If it is complaining when using ternary expressions, you have to cast the rhs 
to Value, otherwise, this is as good as it gets. Another option is using a 
temporary of type Value, e.g. assigning NanNull to this Value variable, then 
using that in the ternary expression.

On Sunday 15 June 2014 16:59:41 Rod Vagg wrote:
> > -    Local<Value> argv[4] = { NanNew<String>("xmlDecl"),
> > -                              version ?
> > NanNew<Value>(String::NewSymbol(version)) -                              
> >        : NanNew<Value>(NanNull()), -                             
> > encoding ? NanNew<Value>(String::NewSymbol(encoding)) -                  
> >                    : NanNew<Value>(NanNull()), -                         
> >     standalone ? NanNew<Value>(NanTrue()) : NanNew<Value>(NanFalse()) };
> > +    Local<Value> argv[4];
> > +
> > +                    argv[0] = NanNew("xmlDecl");
> > +    if (version)    argv[1] = NanNew(version);
> > +    else            argv[1] = NanNull();
> > +    if (encoding)   argv[2] = NanNew(encoding);
> > +    else            argv[2] = NanNull();
> > +    if (standalone) argv[3] = NanTrue();
> > +    else            argv[3] = NanFalse();
> > +
> 
> @kkoopa do you have a better suggestion here btw? it'd be nice to be able to
> use ternaries since this is a sensible use-case but the strict C++ rules on
> typing make it awkward here.
> 
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/node-xmpp/node-expat/pull/91/files#r13789287