|
Boost : |
Subject: Re: [boost] [chrono/date] class names
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-05-12 10:03:31
On May 11, 2013, at 7:13 PM, "Vicente J. Botet Escriba" <vicente.botet_at_[hidden]> wrote:
> What do you think to using namespaces instead of prefixes?
> This will allow to have checked and unchecked unit specifiers as well.
>
> using chrono::checked;
> serial_date dt = may/11/year(2013);
>
> using chrono::unchecked;
> serial_date dt = may/11/year(2013);
I like that. Both sets have full names that indicated whether they are checked or not, can be simplified via using dirs/decls, and can be tuned to exactly what's required in each case.
The only drawback, if you can call it that, is that code can appear ambiguous when using dirs/decls, or typedefs, are in force. That is, two functions can appear identical despite one using checked, and the other using unchecked types.
___
Rob
(Sent from my portable computation engine)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk