Olivier Grant:

Is there any way to hide Splicer.array to the outside world?

If your splice is inside another module, and you tag the array field with private, you will receive an error:


auto splice( size_t N, R )( R range )
   if(isInputRange!R)
{
   struct Splicer
   {
      private R array;


This avoids your mistake, but also forbids you to use the std.array.array on a splice with UFCS. Is this acceptable for you?

Bye,
bearophile

Reply via email to