Skip to main content
update for gcc 7.5
Source Link
kebs
  • 916
  • 7
  • 8

Edit 2022-01-06: gcc 7.5.0 (Ubuntu 18.04): 11405 bytes, still no real clue on what happens, unfortunately (which could be something like, say, erroneous type 'int' as arg 3 for std::find(), expected type: 'std::vector<int>' ).

Oh, BTW, ratio error/code can even be increased by removing unnecessary stuff:

int main()
{
    int a;
    std::vector< std::vector <int> > v;
    std::find( v.begin(), v.end(), a );
}

Edit 2022-01-06: gcc 7.5.0 (Ubuntu 18.04): 11405 bytes, still no real clue on what happens, unfortunately (which could be something like, say, erroneous type 'int' as arg 3 for std::find(), expected type: 'std::vector<int>' ).

Oh, BTW, ratio error/code can even be increased by removing unnecessary stuff:

int main()
{
    int a;
    std::vector< std::vector <int> > v;
    std::find( v.begin(), v.end(), a );
}
Added GCC 6 output
Source Link
kebs
  • 916
  • 7
  • 8

Edit 2019-04-04: gcc 6.5.0: 11237 bytes, but gives some hints on the error, as in theses lines:


error.cpp:7:92:   required from here
/usr/include/c++/6/bits/predefined_ops.h:199:17: error: no match for ‘operator==’ (operand types are ‘std::vector’ and ‘const int’)
  { return *__it == _M_value; }
           ~~~~~~^~~~~~~~~~~

Edit 2019-04-04: gcc 6.5.0: 11237 bytes, but gives some hints on the error, as in theses lines:


error.cpp:7:92:   required from here
/usr/include/c++/6/bits/predefined_ops.h:199:17: error: no match for ‘operator==’ (operand types are ‘std::vector’ and ‘const int’)
  { return *__it == _M_value; }
           ~~~~~~^~~~~~~~~~~
updated numbers for gcc 5.3.0
Source Link
kebs
  • 916
  • 7
  • 8

Edit 2016-04-29: gcc 5.3.0 got it a bit better: only 9300 bytes, longest line is 361 characters long...

Edit 2016-04-29: gcc 5.3.0 got it a bit better: only 9300 bytes, longest line is 361 characters long...

Source Link
kebs
  • 916
  • 7
  • 8
Loading