fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. struct B
  5. {
  6. bool val;
  7. B() {}
  8. B(bool val) : val(val) {}
  9. operator bool&() { return val; }
  10. operator const bool&() const { return val; }
  11. bool* operator&() { return &val; }
  12. const bool* operator&() const { return &val; }
  13. };
  14.  
  15.  
  16. void libraryFunction(bool *ptr)
  17. {
  18.  
  19. }
  20.  
  21. int main(int argc, char **argv)
  22. {
  23. std::vector<B> v;
  24. libraryFunction(&v[0]);
  25.  
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty