Boost logo

Boost :

Subject: Re: [boost] [qvm] Terseness of syntax etc.
From: Sam Kellett (samkellett_at_[hidden])
Date: 2015-12-11 03:36:24


On 10 December 2015 at 20:12, Emil Dotchevski <emildotchevski_at_[hidden]>
wrote:

> On Thu, Dec 10, 2015 at 8:10 AM, Sam Kellett <samkellett_at_[hidden]> wrote:
>
> > what namespace is your comma operator in? it could be placed in an extra
> > namespace which users can explicitly pull in if they prefer the super
> > compact (albeit controversial) syntax and then anybody else could stick
> > with a normal free function (like my swizzle(v, xy) above) which would be
> > in the normal qvm namespace
> >
>
> Yes, all QVM names are safely defined in namespaces.
>
> It's usually fine to bring the entire qvm namespace into whatever namespace
> you want, though this includes both types and operations and it is possible
> to get ambiguities if you have another *type* by the same name, e.g. mat or
> vec.
>
> If that is a problem, you can bring in just boost::qvm::sfinae, which
> contains only operations. This should never lead to any ambiguities or
> clashes.
>

well yes, but i mean the comma operator can go in an extra namespace so
that by default it is not included with the others and if somebody wants to
swizzle that way instead of using a free function that an explicitly 'using
namespace boost::qvm::swizzle' to bring the comma operator into scope.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk