Provide a simpler & more general WAR (const & + const_cast) for the generate_functor problem.
Provide a simpler & more general WAR (const & + const_cast) for the generate_functor problem.

Reported by Andrew Corrigan

Fixes issue 275

malenie/thrust,h1arshad/thrust,google-code-export/thrust,levendlee/thrust,bfurtaw/thrust,allendaicool/thrust,lishi0927/thrust,Vishwa07/thrust,google-code-export/thrust,levendlee/thrust,rdmenezes/thrust,Vishwa07/thrust,levendlee/thrust,rdmenezes/thrust,julianromera/thrust,hemmingway/thrust,Vishwa07/thrust,allendaicool/thrust,bfurtaw/thrust,malenie/thrust,google-code-export/thrust,lishi0927/thrust,UIKit0/thrust,julianromera/thrust,allendaicool/thrust,bfurtaw/thrust,Vishwa07/thrust,google-code-export/thrust,UIKit0/thrust,bfurtaw/thrust,h1arshad/thrust,h1arshad/thrust,malenie/thrust,allendaicool/thrust,h1arshad/thrust,hemmingway/thrust,hemmingway/thrust,hemmingway/thrust,julianromera/thrust,malenie/thrust,rdmenezes/thrust,UIKit0/thrust,julianromera/thrust,levendlee/thrust,UIKit0/thrust,rdmenezes/thrust,lishi0927/thrust,lishi0927/thrust