Title
Definition of user-defined type
Status
cd3
Section
Clause [3] [intro.defs]
Submitter
Loïc Joly

Created on 2012-03-08.00:00:00 last changed 131 months ago

Messages

Date: 2013-04-15.00:00:00

[Moved to DR at the April, 2013 meeting.]

Date: 2012-10-15.00:00:00

Proposed resolution (October, 2012):

  1. Change 9.2.9.3 [dcl.type.simple] paragraph 2 as follows:

  2. The auto specifier is a placeholder for a type to be deduced (9.2.9.7 [dcl.spec.auto]). The other simple-type-specifiers specify either a previously-declared user-defined type, a type determined from an expression, or one of the fundamental types (6.8.2 [basic.fundamental]). Table 10 summarizes the valid combinations of simple-type-specifiers and the types they specify.
  3. Change 7.3 [conv] paragraph 4 as follows:

  4. [Note: For user-defined class types, user-defined conversions are considered as well; see 11.4.8 [class.conv]. In general, an implicit conversion sequence (12.2.4.2 [over.best.ics]) consists of a standard conversion sequence followed by a user-defined conversion followed by another standard conversion sequence. —end note]

  5. Change the example in 12.2.2.3 [over.match.oper] paragraph 1 as follows:

  6.   ...
      void f(void) {
        const char* p= "one" + "two";  // ill-formed because neither
                                       // operand has user-defined class or enumeration type
        int I = 1 + 1;                 // Always evaluates to 2 even if
                                       // user-defined class or enumeration types exist which
                                       // would perform the operation.
      }
    
Date: 2012-03-08.00:00:00

The Standard uses the phrase, “user-defined type,” but it is not clear what it is intended to mean. For example, 16.4.5.2.1 [namespace.std] paragraph 1 says,

A program may add a template specialization for any standard library template to namespace std only if the declaration depends on a user-defined type...

Are types defined in the Standard library “user-defined?”

9.2.9.3 [dcl.type.simple] paragraph 2 says,

The auto specifier is a placeholder for a type to be deduced (9.2.9.7 [dcl.spec.auto]). The other simple-type-specifiers specify either a previously-declared user-defined type or one of the fundamental types (6.8.2 [basic.fundamental]).

implying that all non-fundamental types are “user-defined.”

A definition is needed, as well as a survey of uses of the term to ensure consistency with the definition.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-10-14 00:00:00adminsetstatus: dr -> drwp
2013-05-03 00:00:00adminsetmessages: + msg4365
2013-05-03 00:00:00adminsetstatus: ready -> dr
2012-11-03 00:00:00adminsetmessages: + msg4041
2012-11-03 00:00:00adminsetstatus: open -> ready
2012-03-08 00:00:00admincreate