[review] promotion traits - review period extended until April 9.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[review] promotion traits - review period extended until April 9.

Tobias Schwinger
Dear users & members of Boost,


I decided to extend the review period of the fast-track review for
Promotion Traits until April 9 because there were only three reviews
until now.
That is, you have another three days to submit your evaluation of the
proposed Boost software.

Cheer up, it's a small & fast-to-track submission! We're very much looking
forward to your reviews.


Download URL
============

     http://cpp-experiment.sourceforge.net/promote-20050917.tar.gz


About the submission
====================

The Promotion Traits extend Boost.TypeTraits with templates that compute the type after promotion has been applied.

Example:

    // given
    template<typename T> struct some_algorithm;
    template<> struct some_algorithm<int> { [...] };
    // [...] more specializations

    // ,

    [...] some_algorithm< typename integral_promotion<T>::type > [...]
    // makes some_algorithm work for any type T that promotes to an integer
    // (that is enums and smaller integral types) without the need for
    // additional specialization


Review questions
================

Please always explicitly state in your review, whether you think the library should be accepted into Boost.

You might want to comment on the following questions:

- What is your evaluation of the design?
- What is your evaluation of the implementation?
- What is your evaluation of the documentation?
- What is your evaluation of the potential usefulness of the library?
- Did you try to use the library?  With what compiler?  
  Did you have any problems?
- How much effort did you put into your evaluation? A glance? A
  quick reading? In-depth study?
- Are you knowledgeable about the problem domain?


Regards,
Tobias

(Review Manager)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [review] promotion traits - review period extended untilApril 9.

pabristow
| -----Original Message-----
| From: [hidden email]
| [mailto:[hidden email]] On Behalf Of Tobias Schwinger
| Sent: 06 April 2006 18:26
| To: [hidden email]
| Subject: [boost] [review] promotion traits - review period
| extended untilApril 9.
|
| Dear users & members of Boost,
|
|
| I decided to extend the review period of the fast-track review for
| Promotion Traits until April 9 because there were only three reviews
| until now.
| That is, you have another three days to submit your evaluation of the
| proposed Boost software.
|
| Cheer up, it's a small & fast-to-track submission!

| Review questions
| ================
|
| - What is your evaluation of the design?
Not qualified to comment.

| - What is your evaluation of the implementation?
Not qualfied to comment.

| - What is your evaluation of the documentation?

Definitions given may be adequate, but is MUST have some user-friendly
guidance as to when it would be useful. Even the summary would be better
than nothing!

| The Promotion Traits extend Boost.TypeTraits with templates
| that compute the type after promotion has been applied.
|
| Example:
|
|     // given
|     template<typename T> struct some_algorithm;
|     template<> struct some_algorithm<int> { [...] };
|     // [...] more specializations
|
|     // ,
|
|     [...] some_algorithm< typename integral_promotion<T>::type > [...]
|     // makes some_algorithm work for any type T that promotes to an
integer
|     // (that is enums and smaller integral types) without the need for
|     // additional specialization

Practical exampleS of use are ESSENTIAL.

| - What is your evaluation of the potential usefulness of the library?
When useful, very useful.

| - Did you try to use the library?
No.

| - How much effort did you put into your evaluation?
Fast-track interrupt handling only ;-)

| - Are you knowledgeable about the problem domain?
No.

| Please always explicitly state in your review, whether you
| think the library should be accepted into Boost.
Accept, subject to providing documentation.

Paul

--
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
mailto: [hidden email]  http://www.hetp.u-net.com/index.html
http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [review] promotion traits - review period extended untilApril 9.

Tobias Schwinger
Paul A Bristow wrote:
> | - What is your evaluation of the documentation?
>
> Definitions given may be adequate, but is MUST have some user-friendly
> guidance as to when it would be useful. Even the summary would be better
> than nothing!

I mentioned this concern to the author during pre-review inspection and didn't reject it because it's an add-on to an existing library.

>
> Practical exampleS of use are ESSENTIAL.
>

... given that they are not too lengthy and fit into the overall documentation style of TypeTraits, IMO.


>
> | - How much effort did you put into your evaluation?
> Fast-track interrupt handling only ;-)
>

Thank you very much for the permissive setting of your interrupt mask, then 8-) !


> | Please always explicitly state in your review, whether you
> | think the library should be accepted into Boost.
> Accept, subject to providing documentation.
>

Noted.


Regards,
Tobias

(Review Manager)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [review] promotion traits - review period extended untilApril 9.

Alexander Nasonov
In reply to this post by pabristow
Paul,
Thanks for the review.

Paul A Bristow wrote:
> Definitions given may be adequate, but is MUST have some user-friendly
> guidance as to when it would be useful. Even the summary would be better
> than nothing!
> [ skiped ]
> Practical exampleS of use are ESSENTIAL.

Hopefully, I've found one practical example.

Proposed text:

It is well known that conversion between numeric types has a lot of
nuances. Luckily, Boost Numeric Conversion Library deals with most
of the troubles.
There is one inconvenience, though. Types being converted should conform
to Numeric Type concept. Enumeration types usually don't and you will
have to convert an enum to an appropriate integral type first.
The integral_promotion metafunction is capable of such convertion.
As the name suggests, it applies an integral promotion to a type (para
4.5 of the standard). Types that can't be promoted are returned as-is.
For example, to convert a value of some type T to double, you can write:

   template<class T>
   inline double to_double(T const& value)
   {
       typedef typename boost::integral_promotion<T>::type promoted;
       return boost::numeric::converter<double,promoted>::convert(value);
   }

An additional advantage of applying integral_promotion is reduced number
of instantiations of boost::numeric::converter. Types such as bool,
char, wchatr_t, signed char, unsigned char, short, unsigned short and
potentially big set of enum types are all promoted to a limited set of 4
integral types: int, unsigned int, long and unsigned long.

--
Alexander Nasonov
Project Manager
http://www.akmosoft.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost