Changeset 3892


Ignore:
Timestamp:
Mar 27, 2020, 10:12:47 AM (2 months ago)
Author:
Peter
Message:

fixes #942

Location:
branches/0.17-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.17-stable/NEWS

    r3877 r3892  
    66
    77version 0.17.1 (released NOT YET)
     8  - Fixed ambiguous DiscreteUniform::result_type (bug #942)
    89
    910  A complete list of closed tickets can be found here [[br]]
  • branches/0.17-stable/test/rnd.cc

    r3469 r3892  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    9   Copyright (C) 2012, 2015, 2016 Peter Johansson
     9  Copyright (C) 2012, 2015, 2016, 2020 Peter Johansson
    1010
    1111  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5656  DiscreteGeneral dg(histogram);
    5757  DiscreteUniform du;
     58  {
     59    DiscreteUniform::result_type x = 0;
     60    theplu::yat::test::avoid_compiler_warning(x);
     61    DiscreteUniform::argument_type y = 0;
     62    theplu::yat::test::avoid_compiler_warning(y);
     63  }
    5864  Poisson p;
    5965  ContinuousUniform cu;
  • branches/0.17-stable/yat/random/random.h

    r3591 r3892  
    66/*
    77  Copyright (C) 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Peter Johansson
     8  Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2020 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    407407     Variance: \f$ \frac{1}{12}(n-1)(n+1) \f$
    408408  */
    409   class DiscreteUniform
    410     : public Discrete,
    411       public std::unary_function<unsigned long, unsigned long>
    412   {
    413   public:
     409  class DiscreteUniform : public Discrete
     410  {
     411  public:
     412    /// argument type is unsigned long int
     413    typedef unsigned long argument_type;
     414
    414415    /**
    415416       \brief Constructor.
Note: See TracChangeset for help on using the changeset viewer.