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

Constraint-facet-pack tests failing due to copy-vs-move issues #16

Open
eyalroz opened this issue Jan 10, 2020 · 1 comment
Open

Constraint-facet-pack tests failing due to copy-vs-move issues #16

eyalroz opened this issue Jan 10, 2020 · 1 comment
Assignees

Comments

@eyalroz
Copy link
Owner

eyalroz commented Jan 10, 2020

In tests/facet_pack.cpp we have the test_constrained_fpe() function. It uses move and copy construction counting to check whether certain values are copied or moved - and we fail because there as some copies when there should be moves:

/home/eyalroz/src/mine/strf/test/facets_pack.cpp:384:  test (1 == 0) failed. 
    In function 'void test_constrained_fpe()'
/home/eyalroz/src/mine/strf/test/facets_pack.cpp:387:  test (2 == 0) failed. 
    In function 'void test_constrained_fpe()'
/home/eyalroz/src/mine/strf/test/facets_pack.cpp:390:  test (3 == 0) failed. 
    In function 'void test_constrained_fpe()'
/home/eyalroz/src/mine/strf/test/facets_pack.cpp:393:  test (4 == 0) failed. 
    In function 'void test_constrained_fpe()'
/home/eyalroz/src/mine/strf/test/facets_pack.cpp:396:  test (5 == 0) failed. 
    In function 'void test_constrained_fpe()'

there are additional failures which may or may not be related to these.

The problem seems to be that a lot of move ctors for facet packs, which inherit from fact_pack_base - don't use std::move() when constructing their base class. Which apparently we need to do.

@eyalroz eyalroz self-assigned this Jan 10, 2020
@eyalroz
Copy link
Owner Author

eyalroz commented Jan 10, 2020

Also, there are two redundant ctor's which wouldn't compile if they ever got instantiated...

eyalroz pushed a commit that referenced this issue Jan 10, 2020
* Using `std::move()` on base-class initializers for `fpe_wrapper`, `constrained_fpe`, `facts_pack`, `facet_pack_base.
* Removed two unused and invalid ctors for `facet_pack_base`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant