aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-12-19 15:10:49 -0500
committerJason Merrill <jason@gcc.gnu.org>2011-12-19 15:10:49 -0500
commit11c71a22d90023ec27f04b80e92838af8af692a2 (patch)
tree1f29fff9643d552d01255418d102f7c4d9dc4eeb /gcc/cp/cp-tree.h
parent00ef7059049de2761ed8c9db8839ce3566d09cb7 (diff)
downloadgcc-11c71a22d90023ec27f04b80e92838af8af692a2.zip
gcc-11c71a22d90023ec27f04b80e92838af8af692a2.tar.gz
gcc-11c71a22d90023ec27f04b80e92838af8af692a2.tar.bz2
re PR c++/51553 (brace initialization and conversion operators)
PR c++/51553 * cp-tree.h (LOOKUP_LIST_INIT_CTOR): Rename from LOOKUP_NO_COPY_CTOR_CONVERSION. (add_list_candidates): Set it earlier. (add_candidates): Don't check explicit on ctors when it's set. (add_function_candidate): Check it even when LOOKUP_ONLYCONVERTING is set. From-SVN: r182496
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 42a9ced..633b6b4 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4384,11 +4384,10 @@ enum overload_flags { NO_SPECIAL = 0, DTOR_FLAG, TYPENAME_FLAG };
#define LOOKUP_PREFER_RVALUE (LOOKUP_HIDDEN << 1)
/* We're inside an init-list, so narrowing conversions are ill-formed. */
#define LOOKUP_NO_NARROWING (LOOKUP_PREFER_RVALUE << 1)
-/* Avoid user-defined conversions for the first parameter of a copy
- constructor (or move constructor). */
-#define LOOKUP_NO_COPY_CTOR_CONVERSION (LOOKUP_NO_NARROWING << 1)
+/* We're looking up a constructor for list-initialization. */
+#define LOOKUP_LIST_INIT_CTOR (LOOKUP_NO_NARROWING << 1)
/* This is the first parameter of a copy constructor. */
-#define LOOKUP_COPY_PARM (LOOKUP_NO_COPY_CTOR_CONVERSION << 1)
+#define LOOKUP_COPY_PARM (LOOKUP_LIST_INIT_CTOR << 1)
/* We only want to consider list constructors. */
#define LOOKUP_LIST_ONLY (LOOKUP_COPY_PARM << 1)
/* Return after determining which function to call and checking access.