8000 fails to compile with recent gcc/clang · Issue #13 · master-keying/minisat · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
fails to compile with recent gcc/clang #13
Open
@dzosz

Description

@dzosz

Clang 12.0.1
[ 8%] Building CXX object CMakeFiles/libminisat.dir/minisat/core/OutOfMemoryException.cc.o [ 16%] Building CXX object CMakeFiles/libminisat.dir/minisat/core/Solver.cc.o In file included from .../minisat/minisat/core/Solver.cc:23: In file included from .../minisat/minisat/mtl/Sort.h:24: .../minisat/minisat/mtl/Vec.h:49:18: error: no member named 'numeric_limits' in namespace 'std' if (std::numeric_limits<size_type>::max() - old_cap < old_cap / 2) { ~~~~~^ .../minisat/mtl/Vec.h:49:33: error: unexpected type name 'size_type': expected expression if (std::numeric_limits<size_type>::max() - old_cap < old_cap / 2) { ^ .../minisat/mtl/Vec.h:49:45: error: no member named 'max' in the global namespace if (std::numeric_limits<size_type>::max() - old_cap < old_cap / 2) { ~~^ 3 errors generated. make[2]: *** [CMakeFiles/libminisat.dir/build.make:90: CMakeFiles/libminisat.dir/minisat/core/Solver.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:219: CMakeFiles/libminisat.dir/all] Error 2 make: *** [Makefile:146: all] Error 2
Gcc 11.2.1
[ 8%] Building CXX object CMakeFiles/libminisat.dir/minisat/core/SolverTypes.cc.o In file included from /.../minisat/minisat/mtl/Alg.h:24, from /.../minisat/minisat/core/SolverTypes.h:29, from /.../minisat/minisat/core/SolverTypes.cc:5: /.../minisat/minisat/mtl/Vec.h: In member function ‘Minisat::vec<T>::size_type Minisat::vec<T>::adjust_next_size(Minisat::vec<T>::size_type)’: /.../minisat/minisat/mtl/Vec.h:49:18: error: ‘numeric_limits’ is not a member of ‘std’ 49 | if (std::numeric_limits<size_type>::max() - old_cap < old_cap / 2) { | ^~~~~~~~~~~~~~ /.../minisat/minisat/mtl/Vec.h:49:42: error: expected primary-expression before ‘>’ token 49 | if (std::numeric_limits<size_type>::max() - old_cap < old_cap / 2) { | ^ /.../minisat/minisat/mtl/Vec.h:49:45: error: ‘::max’ has not been declared; did you mean ‘std::max’? 49 | if (std::numeric_limits& 4ECE lt;size_type>::max() - old_cap < old_cap / 2) { | ^~~ | std::max

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0