Ticket #8343: 0003-doc-fix-typo-in-a-comment-of-the-example.patch

File 0003-doc-fix-typo-in-a-comment-of-the-example.patch, 1.1 KB (added by Akim Demaille <akim.demaille@…>, 10 years ago)
  • doc/numeric_cast.qbk

    From 42151b279a2de855a837548b79941e26349d5694 Mon Sep 17 00:00:00 2001
    From: Akim Demaille <akim@lrde.epita.fr>
    Date: Wed, 27 Mar 2013 16:59:59 +0100
    Subject: [PATCH 3/3] doc: fix typo in a comment of the example
    
    * doc/numeric_cast.qbk: The comment makes more sense about unsigned
    types, instead of "conversion to a signed type".
    ---
     doc/numeric_cast.qbk | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/numeric_cast.qbk b/doc/numeric_cast.qbk
    index 7940573..d1b542e 100644
    a b The following example performs some typical conversions between numeric types:  
    135135        {
    136136            // This will throw a boost::numeric::positive_overflow exception.
    137137            // NOTE: *operations* on unsigned integral types cannot cause overflow
    138             // but *conversions* to a signed type ARE range checked by numeric_cast.
     138            // but *conversions* between unsigned types ARE range checked by numeric_cast.
    139139
    140140            unsigned char c=numeric_cast<unsigned char>(l);
    141141        }