Ignore:
Timestamp:
Jan 15, 2010, 8:36:06 PM (13 years ago)
Author:
Peter
Message:

improve compile error message in random_shuffle. refs #489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/random/random.h

    r2142 r2145  
    66/*
    77  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009 Peter Johansson
     8  Copyright (C) 2009, 2010 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2525
    2626#include "yat/statistics/Histogram.h"
     27
     28#include <boost/concept_check.hpp>
    2729
    2830#include <gsl/gsl_rng.h>
     
    602604     random generator and thereby using the underlying RNG class,
    603605     which is singleton.
     606
     607     RandomAccessIterator must be mutable
    604608   */
    605609  template<typename RandomAccessIterator>
    606610  void random_shuffle(RandomAccessIterator first, RandomAccessIterator last)
    607611  {
     612    typedef RandomAccessIterator rai;
     613    typedef boost::Mutable_RandomAccessIteratorConcept<rai> mric;
     614    boost::function_requires<mric>();
    608615    DiscreteUniform rnd;
    609616    std::random_shuffle(first, last, rnd);
Note: See TracChangeset for help on using the changeset viewer.