relipmoc / skewer

MIT License
95 stars 17 forks source link

'is_invocable' error when compiling in Cygwin #53

Open AlexSath opened 2 years ago

AlexSath commented 2 years ago

I've run into this error when trying to compile skewer on windows 10 using Cygwin. I've tried with GCC, g++, and clang. All show the following error (although clang shows traceback).

$ make CXX=clang
clang -c -std=c++17 -O2 src/matrix.cpp -o src/matrix.o
In file included from src/matrix.cpp:35:
In file included from src/matrix.h:37:
In file included from /usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/set:60:
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_tree.h:769:4: error:
      static_assert failed due to requirement 'is_invocable_v<const
      ElementComparator &, const ELEMENT &, const ELEMENT &>' "comparison object
      must be invocable as const"
          static_assert(
          ^
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_tree.h:1903:30: note: in
      instantiation of member function 'std::_Rb_tree<ELEMENT, ELEMENT,
      std::_Identity<ELEMENT>, ElementComparator, std::allocator<ELEMENT>
      >::_S_key' requested here
        if (!_M_impl._M_key_compare(_S_key(__x), __k))
                                    ^
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_tree.h:2521:22: note: in
      instantiation of member function 'std::_Rb_tree<ELEMENT, ELEMENT,
      std::_Identity<ELEMENT>, ElementComparator, std::allocator<ELEMENT>
      >::_M_lower_bound' requested here
      iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
                     ^
/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++/bits/stl_set.h:795:21: note: in
      instantiation of member function 'std::_Rb_tree<ELEMENT, ELEMENT,
      std::_Identity<ELEMENT>, ElementComparator, std::allocator<ELEMENT>
      >::find' requested here
      { return _M_t.find(__x); }
                    ^
src/matrix.cpp:147:35: note: in instantiation of member function
      'std::set<ELEMENT, ElementComparator, std::allocator<ELEMENT> >::find'
      requested here
        ELEMENT_SET::iterator it = this->find(val);
                                         ^
1 error generated.
make: *** [Makefile:35: src/matrix.o] Error 1