Changeset 2174


Ignore:
Timestamp:
Jan 30, 2010, 3:52:38 PM (12 years ago)
Author:
Peter
Message:

fixes #597. Testing with mutable forward iterator becase could not find any trivial iterator archetype in boost (although it is documented).

Location:
branches/0.6-stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.6-stable/test/data_weight_proxy_test.cc

    r2122 r2174  
    2424#include "yat/utility/DataWeight.h"
    2525#include "yat/utility/DataWeightProxy.h"
     26
     27#include <boost/concept_archetype.hpp>
    2628
    2729namespace theplu {
     
    109111  suite.add(suite.equal(holder().weight(), 1));
    110112
     113  // do not run compile tests
     114  if (false) {
     115    typedef boost::mutable_trivial_iterator_archetype<double> iterator;
     116    iterator iter;
     117    utility::DataWeightProxy<iterator, iterator> proxy(iter, iter);
     118    double x = proxy.data();
     119    x = proxy.weight();
     120    proxy.data() = proxy.weight() = 0.0;
     121  }
     122
    111123  return suite.return_value();
    112124}
  • branches/0.6-stable/yat/utility/DataWeightProxy.h

    r2122 r2174  
    3535     \brief Proxy class for DataWeight
    3636
    37      DataIterator and WeightIterator should be a TrivialIterator
     37     DataIterator and WeightIterator should be a mutable TrivialIterator
    3838  */
    3939  template<typename DataIterator, typename WeightIterator>
Note: See TracChangeset for help on using the changeset viewer.