Opened 6 years ago

Last modified 6 years ago

#12251 new Feature Requests

Add constexpr support to random number generators

Reported by: Guillem Blanco <gblanco92@…> Owned by: No-Maintainer
Milestone: Boost 1.62.0 Component: random
Version: Boost 1.61.0 Severity: Problem
Keywords: random, constexpr Cc:

Description

Since C++11 the Standard requires the min/max functions of a random number generator to be constexpr [26.5.1.3]. Annotating the min/max functions with BOOST_CONSTEXPR should be enough to fix this.

Because of this defect using random number generators from boost::random with random number distributions from libc++ results in a compile time error. (Tested with libc++-3.7)

Change History (1)

comment:1 by Guillem Blanco <gblanco92@…>, 6 years ago

I've submitted a pull-request here: https://github.com/boostorg/random/pull/24

Note: See TracTickets for help on using tickets.