On Sat, Aug 25, 2012 at 8:29 PM, Paolo Carlini <paolo.carl...@oracle.com> wrote: > Understood, but you do *not* loose performance by having those fill functions > templates,
Let's see. The prototypes will then be something like this: template<typename _RealType = double> class normal_distribution { template<typename _UniformRandomNumberGenerator, typename _OutputIterator> void fill(_OutputIterator __f, _OutputIterator __t, _UniformRandomNumberGenerator& __urng, const param_type& __p); }; Now I want to define a specialized function which works for a double iterator and all RNGs. That's not possible because it means partial specialization. Therefore I'd have to add another member function to the class. If this is what is wanted I can do this (in fact, I have the code ready). It just looks worse because the special functions are in some cases architecture-specific. This means the code will be littered with arch-specific code.