<bits/move.h> is a part of <utility>.

<bits/move.h> provides std::forward, std::move, and std::swap. These are
defined to come from <utility> and not <algorithm>.

In c++11 and later std::swap comes from <utility>, previously it came from
<algorithm>. Fortunately, <bits/move.h> is a c++11 only header, so if any
symbols are being seen in it, that's where they should come from.

No test for this because mappings are non-portable.

This was reported in #486.
This commit is contained in:
bungeman 2018-03-08 14:10:42 -05:00 committed by Kim Grasman
parent 5de96e9005
commit 314fc2d182
3 changed files with 3 additions and 7 deletions

View File

@ -114,9 +114,7 @@
{ include: ["<tr1_impl/unordered_set>", private, "<unordered_set>", public ] },
{ include: ["<tr1_impl/utility>", private, "<tr1/utility>", public ] },
{ include: ["<tr1_impl/utility>", private, "<utility>", public ] },
# This didn't come from the grep, but seems to be where swap()
# is defined?
{ include: ["<bits/move.h>", private, "<algorithm>", public ] }, # for swap<>()
{ include: ["<bits/move.h>", private, "<utility>", public ] },
# Hash and hashtable-based containers.
{ include: ["<tr1_impl/functional_hash.h>", private, "<tr1/functional>", public ] },
{ include: ["<tr1_impl/functional_hash.h>", private, "<tr1/unordered_map>", public ] },

View File

@ -662,9 +662,7 @@ const IncludeMapEntry libstdcpp_include_map[] = {
{ "<tr1_impl/unordered_set>", kPrivate, "<unordered_set>", kPublic },
{ "<tr1_impl/utility>", kPrivate, "<tr1/utility>", kPublic },
{ "<tr1_impl/utility>", kPrivate, "<utility>", kPublic },
// This didn't come from the grep, but seems to be where swap()
// is defined?
{ "<bits/move.h>", kPrivate, "<algorithm>", kPublic }, // for swap<>()
{ "<bits/move.h>", kPrivate, "<utility>", kPublic },
// Hash and hashtable-based containers.
{ "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/functional>", kPublic },
{ "<tr1_impl/functional_hash.h>", kPrivate, "<tr1/unordered_map>", kPublic },

View File

@ -4,7 +4,7 @@
{ include: ["<__mutex_base>", private, "<mutex>", public ] },
{ symbol: [ "std::declval", private, "<utility>", public ] },
{ symbol: [ "std::forward", private, "<utility>", public ] },
{ symbol: [ "std::move", private, "<algorithm>", public ] },
{ symbol: [ "std::move", private, "<utility>", public ] },
{ symbol: [ "std::nullptr_t", private, "<cstddef>", public ] },
{ symbol: [ "std::string", private, "<string>", public ] },
]