fork download
  1. #include <cassert>
  2. #include <ctime>
  3. #include <cstdlib>
  4. #include <bitset>
  5. #include <iostream>
  6. #include <fstream>
  7. #include <iomanip>
  8. #include <string>
  9. #include <sstream>
  10. #include <memory>
  11. #include <vector>
  12. #include <set>
  13. #include <list>
  14. #include <limits>
  15. #include <algorithm>
  16. #include <functional>
  17. #include <iterator>
  18.  
  19. using namespace std;
  20.  
  21. class Pixel
  22. {
  23. public:
  24. bool AreSamplesIdentical() const
  25. {
  26. return true;
  27. }
  28. };
  29.  
  30. namespace
  31. {
  32. class Predicate_SamplesEqual : public unary_function<const Pixel&, bool>
  33. {
  34. public:
  35. bool operator () (const Pixel& pixel) const
  36. {
  37. return pixel.AreSamplesIdentical();
  38. }
  39. };
  40. }
  41.  
  42. int main()
  43. {
  44. vector<Pixel> pixels(10);
  45. find_if(pixels.begin(), pixels.end(), not1(Predicate_SamplesEqual()));
  46. }
  47.  
Success #stdin #stdout 0s 3024KB
stdin
Standard input is empty
stdout
Standard output is empty