Bug 82966 - node_handle swap fails to compile
Summary: node_handle swap fails to compile
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 7.3.0
: P3 normal
Target Milestone: 7.4
Assignee: Jonathan Wakely
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2017-11-13 16:17 UTC by Daniel James
Modified: 2018-05-14 22:23 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 7.3.0, 8.1.0
Last reconfirmed: 2018-05-14 00:00:00


Attachments
Simple demonstration of error (115 bytes, text/plain)
2017-11-13 16:17 UTC, Daniel James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel James 2017-11-13 16:17:54 UTC
Created attachment 42593 [details]
Simple demonstration of error

Swapping a node handle fails because 'propagate_on_container_swap' is a type but is used as a value in bits/node_handle.h. It should be 'propagate_on_container_swap::value'. I've attached an example that fails to compile.
Comment 1 Jonathan Wakely 2018-05-14 14:28:26 UTC
Author: redi
Date: Mon May 14 14:27:54 2018
New Revision: 260226

URL: https://gcc.gnu.org/viewcvs?rev=260226&root=gcc&view=rev
Log:
PR libstdc++/82966 fix swapping of node handles

	PR libstdc++/82966
	* include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
	instead of type.
	* testsuite/23_containers/set/modifiers/node_swap.cc: New.

Added:
    trunk/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/node_handle.h
Comment 2 Jonathan Wakely 2018-05-14 21:52:18 UTC
Author: redi
Date: Mon May 14 21:51:46 2018
New Revision: 260240

URL: https://gcc.gnu.org/viewcvs?rev=260240&root=gcc&view=rev
Log:
PR libstdc++/82966 fix swapping of node handles

	PR libstdc++/82966
	* include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
	instead of type.
	* testsuite/23_containers/set/modifiers/node_swap.cc: New.

Added:
    branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc
Modified:
    branches/gcc-8-branch/libstdc++-v3/ChangeLog
    branches/gcc-8-branch/libstdc++-v3/include/bits/node_handle.h
Comment 3 Jonathan Wakely 2018-05-14 22:22:55 UTC
Author: redi
Date: Mon May 14 22:22:23 2018
New Revision: 260242

URL: https://gcc.gnu.org/viewcvs?rev=260242&root=gcc&view=rev
Log:
PR libstdc++/82966 fix swapping of node handles

	PR libstdc++/82966
	* include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
	instead of type.
	* testsuite/23_containers/set/modifiers/node_swap.cc: New.

Added:
    branches/gcc-7-branch/libstdc++-v3/testsuite/23_containers/set/modifiers/node_swap.cc
Modified:
    branches/gcc-7-branch/libstdc++-v3/ChangeLog
    branches/gcc-7-branch/libstdc++-v3/include/bits/node_handle.h
Comment 4 Jonathan Wakely 2018-05-14 22:23:22 UTC
Fixed for 7.4 and 8.2