Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84998 - trunk/boost/multiprecision
From: john_at_[hidden]
Date: 2013-07-10 12:08:57


Author: johnmaddock
Date: 2013-07-10 12:08:57 EDT (Wed, 10 Jul 2013)
New Revision: 84998
URL: http://svn.boost.org/trac/boost/changeset/84998

Log:
Change return type to reference to passed argument.

Text files modified:
   trunk/boost/multiprecision/integer.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/multiprecision/integer.hpp
==============================================================================
--- trunk/boost/multiprecision/integer.hpp Wed Jul 10 12:08:12 2013 (r84997)
+++ trunk/boost/multiprecision/integer.hpp 2013-07-10 12:08:57 EDT (Wed, 10 Jul 2013) (r84998)
@@ -13,19 +13,19 @@
 namespace multiprecision{
 
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer&>::type
    multiply(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) * static_cast<Integer>(b);
 }
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer&>::type
    add(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) + static_cast<Integer>(b);
 }
 template <class Integer, class I2>
-typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer>::type
+typename enable_if_c<is_integral<Integer>::value && is_integral<I2>::value, Integer&>::type
    subtract(Integer& result, const I2& a, const I2& b)
 {
    return result = static_cast<Integer>(a) - static_cast<Integer>(b);


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