Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static assert fail building sat in debug mode on Windows #2077

Closed
JoelKKelso opened this issue Jun 19, 2020 · 2 comments
Closed

static assert fail building sat in debug mode on Windows #2077

JoelKKelso opened this issue Jun 19, 2020 · 2 comments
Assignees
Labels
Bug Duplicate Lang: C++ Native implementation issue OS: Windows Windows OS
Milestone

Comments

@JoelKKelso
Copy link

What version of OR-tools and what language are you using?
Version: v7.7
Language: C++

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
CP-SAT

What operating system (Linux, Windows, ...) and version?
Windows 10. Visual Studio 2019 16.4.9

What did you do?
Build ortools.

What did you expect to see

What did you see instead?
A static_assert in ortools/sat/encoding.h (see below) fails in debug build, but not release.

ortools/sat/encoding.h Line 129:

// Note that we use <= because on 32 bits architecture, the size will actually
// be smaller than 64 bytes.
static_assert(sizeof(EncodingNode) <= 64,
"ERROR_EncodingNode_is_not_well_compacted");

I notice that prior to v7.7 this was a COMPILE_ASSERT macro rather than static_assert.

@lperron
Copy link
Collaborator

lperron commented Jun 19, 2020

32 bit support was dropped a few years ago.

@Mizux
Copy link
Collaborator

Mizux commented Sep 16, 2020

For the record, fixed by #2147

@Mizux Mizux modified the milestones: v7.8, v8.0 Sep 16, 2020
@Mizux Mizux added Bug Lang: C++ Native implementation issue OS: Windows Windows OS Duplicate labels Sep 16, 2020
@Mizux Mizux self-assigned this Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Duplicate Lang: C++ Native implementation issue OS: Windows Windows OS
Projects
None yet
Development

No branches or pull requests

3 participants