Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54685 - sandbox/itl/boost/validate/laws
From: afojgo_at_[hidden]
Date: 2009-07-05 16:57:01


Author: jofaber
Date: 2009-07-05 16:57:00 EDT (Sun, 05 Jul 2009)
New Revision: 54685
URL: http://svn.boost.org/trac/boost/changeset/54685

Log:
Refactoring, portability: Helped gcc-4.3.2 with BinaryPushout.

Text files modified:
   sandbox/itl/boost/validate/laws/map_laws.hpp | 18 +++++++++---------
   sandbox/itl/boost/validate/laws/pushouts.hpp | 10 ++++++----
   2 files changed, 15 insertions(+), 13 deletions(-)

Modified: sandbox/itl/boost/validate/laws/map_laws.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/map_laws.hpp (original)
+++ sandbox/itl/boost/validate/laws/map_laws.hpp 2009-07-05 16:57:00 EDT (Sun, 05 Jul 2009)
@@ -122,33 +122,33 @@
             // --- left hand side ------------------------
             // lhs := (a.absorb_neutrons() == b.absorb_neutrons())
 
- cout << name() << "::debug_holds():" << endl;
- cout << "Instance: " << typeString() << endl;
- cout << "Formula: " << formula() << endl;
+ std::cout << name() << "::debug_holds():" << std::endl;
+ std::cout << "Instance: " << typeString() << std::endl;
+ std::cout << "Formula: " << formula() << std::endl;
 
             MapT a = this->template getInputValue<operand_a>();
             MapT b = this->template getInputValue<operand_b>();
 
- cout << "a: " << a.as_string() << endl;
- cout << "b: " << b.as_string() << endl;
+ std::cout << "a: " << a.as_string() << std::endl;
+ std::cout << "b: " << b.as_string() << std::endl;
 
             MapT a_protonic = a;
             a_protonic.absorb_neutrons();
             MapT b_protonic = b;
             b_protonic.absorb_neutrons();
 
- cout << "a.absorb_neutrons(): " << a_protonic.as_string() << endl;
- cout << "b.absorb_neutrons(): " << b_protonic.as_string() << endl;
+ std::cout << "a.absorb_neutrons(): " << a_protonic.as_string() << std::endl;
+ std::cout << "b.absorb_neutrons(): " << b_protonic.as_string() << std::endl;
 
             bool lhs = a_protonic == b_protonic;
 
- cout << "lhs := (a.absorb_neutrons() == b.absorb_neutrons()): " << lhs << endl;
+ std::cout << "lhs := (a.absorb_neutrons() == b.absorb_neutrons()): " << lhs << std::endl;
 
             // --- right hand side -----------------------
             // rhs := is_protonic_equal(a, b)
             bool rhs = is_protonic_equal(a, b);
 
- cout << "rhs := is_protonic_equal(a, b): " << rhs << endl;
+ std::cout << "rhs := is_protonic_equal(a, b): " << rhs << std::endl;
 
             this->template setOutputValue<lhs_result>(lhs);
             this->template setOutputValue<rhs_result>(rhs);

Modified: sandbox/itl/boost/validate/laws/pushouts.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/pushouts.hpp (original)
+++ sandbox/itl/boost/validate/laws/pushouts.hpp 2009-07-05 16:57:00 EDT (Sun, 05 Jul 2009)
@@ -64,10 +64,10 @@
 
             // --- right hand side -----------------------
             // rhs := atomize(a) * atomize(b)
- SourceT value_a = this->template getInputValue<operand_a>();
+ SourceT value_a = this->template getInputValue<operand_a>();
             TargetT atomic_a;
             FunctionT<TargetT,SourceT>()(atomic_a, value_a);
- SourceT value_b = this->template getInputValue<operand_b>();
+ SourceT value_b = this->template getInputValue<operand_b>();
             TargetT atomic_b;
             FunctionT<TargetT,SourceT>()(atomic_b, value_b);
             TargetT rhs = atomic_a;
@@ -107,11 +107,13 @@
 
             // --- right hand side -----------------------
             // rhs := atomize(a) * atomize(b)
+ SourceT value_a = this->template getInputValue<operand_a>();
             TargetT atomic_a;
- FunctionT<TargetT,SourceT>()(atomic_a, this->template getInputValue<operand_a>());
+ FunctionT<TargetT,SourceT>()(atomic_a, value_a);
             std::cout << "f(a):" << atomic_a.as_string() << std::endl;
+ SourceT value_b = this->template getInputValue<operand_b>();
             TargetT atomic_b;
- FunctionT<TargetT,SourceT>()(atomic_b, this->template getInputValue<operand_b>());
+ FunctionT<TargetT,SourceT>()(atomic_b, value_b);
             std::cout << "f(b):" << atomic_b.as_string() << std::endl;
             TargetT rhs = atomic_a;
             OperatorT<TargetT>()(rhs, atomic_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