Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r48711 - in sandbox/committee/concepts: issues/issues stdlib
From: dgregor_at_[hidden]
Date: 2008-09-10 17:47:08


Author: dgregor
Date: 2008-09-10 17:47:07 EDT (Wed, 10 Sep 2008)
New Revision: 48711
URL: http://svn.boost.org/trac/boost/changeset/48711

Log:
Make ArithmeticLike constructor requirements explicit
Text files modified:
   sandbox/committee/concepts/issues/issues/issue47.xml | 2 +-
   sandbox/committee/concepts/stdlib/clib-concepts.tex | 9 ++++++---
   2 files changed, 7 insertions(+), 4 deletions(-)

Modified: sandbox/committee/concepts/issues/issues/issue47.xml
==============================================================================
--- sandbox/committee/concepts/issues/issues/issue47.xml (original)
+++ sandbox/committee/concepts/issues/issues/issue47.xml 2008-09-10 17:47:07 EDT (Wed, 10 Sep 2008)
@@ -3,7 +3,7 @@
   <!ENTITY nbsp "&#160;">
 ] >
 
-<issue num="47" status="New">
+<issue num="47" status="WP">
   <title><code>ArithmeticLike</code> conversions from integral, floating-point types should be <code>explicit</code></title>
 <section><sref ref="[concept.arithmetic]"/></section>
 <submitter>Howard Hinnant</submitter>

Modified: sandbox/committee/concepts/stdlib/clib-concepts.tex
==============================================================================
--- sandbox/committee/concepts/stdlib/clib-concepts.tex (original)
+++ sandbox/committee/concepts/stdlib/clib-concepts.tex 2008-09-10 17:47:07 EDT (Wed, 10 Sep 2008)
@@ -127,6 +127,9 @@
     follow-on issue 866), there is no longer a need for the
     \tcode{HasPlacementNew} concept in the Standard Library, so it has
     been removed.
+ \item Made the \tcode{intmax_t}, \tcode{uintmax_t}, and
+ \tcode{long double} constructors in the arithmetic concept
+ \tcode{explicit}, resolving concepts issue \#47.
 \end{itemize}
 
 \end{titlepage}
@@ -1797,9 +1800,9 @@
     HasPreincrement<T>, HasPostincrement<T>, HasPredecrement<T>, HasPostdecrement<T>,
     HasPlusAssign<T, const T&>, HasMinusAssign<T, const T&>,
     HasMultiplyAssign<T, const T&>, HasDivideAssign<T, const T&> {
- T::T(intmax_t);
- T::T(uintmax_t);
- T::T(long double);
+ explicit T::T(intmax_t);
+ explicit T::T(uintmax_t);
+ explicit T::T(long double);
 
   requires Convertible<HasUnaryPlus<T>::result_type, T>
         && Convertible<HasNegate<T>::result_type, T>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk