#11904 closed Bugs (fixed)
is_nothrow_move_constructible does not compile on GCC 4.6
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | type_traits |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Tests is_nothrow_move_constructible_test and is_nothrow_move_constructible_test_no_intrinsics fail in branch Develop on tester igaztanaga-gcc-4.6c++11 (and also igaztanaga-gcc-4.7c++11).
By "fail" I mean that the trait returns neither true nor false, but simply fails the compilation. This in turn causes failures in Boost.Optional.
Change History (4)
follow-up: 2 comment:1 by , 7 years ago
comment:2 by , 7 years ago
Replying to johnmaddock:
I don't know how to fix this - those GCC versions fail inside the noexcept expression when the class being tested has a private assignment operator or copy constructor. There appear to be no compiler intrinsics available for those GCC versions either. So I'm stuck.
I understand the difficulty. Is it possible to isolate the offending compiler versions and provide a trivial definition of the trait for them? I can see it is not easy as the traits seam to work for other testers with GCC 4.6.
BTW I don't believe this ever worked, but I could be wrong?
I cannot be sure. But I thing these errors weren't there in Boost.Optional. Perhaps these testers are new.
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
OK, I've basically disabled these two traits for older gcc versions - see https://github.com/boostorg/type_traits/commit/1f3a3a1553dc316ed002354dce3ba3f081b2e102 - note that this introduces new failures as all UDT's now report false with these traits for gcc < 4.8, this is safe but obviously sub-optimal.
comment:4 by , 5 years ago
Update: in response to https://github.com/boostorg/variant/issues/47 I've tentatively re-enabled support for is_nothrow_move_constructible in gcc-4.7. Tests all pass locally, so we'll see.
I don't know how to fix this - those GCC versions fail inside the noexcept expression when the class being tested has a private assignment operator or copy constructor. There appear to be no compiler intrinsics available for those GCC versions either. So I'm stuck.
BTW I don't believe this ever worked, but I could be wrong?