Simple Example
Presented below is a simple (contrived) example of a C++ hello world program, where the text to be printed and the method of printing it are decomposed using policies.
#includeYou could easily write another OutputPolicy by adding a new class with the member function print and take that as the new OutputPolicy.
Read more about this topic: Policy-based Design
Famous quotes containing the word simple:
“He prayed more deeply for simple selflessness than he had ever prayed beforeand, feeling an uprush of grace in the very intention, shed the night in his heart and called it light. And walking out of the little church he felt confirmed in not only the worth of his whispered prayer but in the realization, as well, that Christ had become man and not some bell-shaped Corinthian column with volutes for veins and a mandala of stone foliage for a heart.”
—Alexander Theroux (b. 1940)
“The simple opposition between the people and big business has disappeared because the people themselves have become so deeply involved in big business.”
—Walter Lippmann (18891974)