File: Assignable.xml

package info (click to toggle)
boost1.67 1.67.0-13%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 489,644 kB
  • sloc: cpp: 2,931,611; xml: 134,662; ansic: 74,483; python: 31,874; sh: 9,996; asm: 3,827; cs: 2,121; makefile: 1,719; perl: 965; yacc: 476; php: 212; pascal: 115; ruby: 94; f90: 55; lisp: 14; sql: 13; csh: 6
file content (59 lines) | stat: -rw-r--r-- 1,988 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0"?>
<concept name="Assignable" category="Utility"><!--
Based on concepts from the SGI Standard Template Library documentation:
Copyright (c) 1996-1999
Silicon Graphics Computer Systems, Inc.

Copyright (c) 1994
Hewlett-Packard Company
--><!--
Copyright 2000-2001 University of Notre Dame du Lac.
Copyright 2001-2002 Indiana University.
Some concepts based on versions from the MTL draft manual and Boost Graph
and Property Map documentation:
Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
-->
  <param name="X" role="assignable-type"/>

  <models-sentence>The type <arg num="1"/> must be a model of <self/>.</models-sentence>

  <description>
    <para>Assignable types must have copy constructors,
    <code>operator=</code> for assignment, and the <code>swap()</code>
    function defined.</para>
  </description>

  <notation variables="x y">
    <sample-value>
      <type name="X"/>
    </sample-value>
  </notation>

  <refines const="no" concept="CopyConstructible"/>

  <valid-expression name="Assignment">
    <assign>
      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
      <sample-value><const><reference-to><type name="X"/></reference-to></const></sample-value>
    </assign>
    <return-type>
      <require-same-type testable="yes">
	<reference-to><type name="X"/></reference-to>
      </require-same-type>
    </return-type>
    <semantics>Require <code>operator=</code></semantics>
  </valid-expression>

  <valid-expression name="Swap">
    <apply-function name="swap">
      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
      <sample-value><reference-to><type name="X"/></reference-to></sample-value>
    </apply-function>
    <return-type><require-same-type><type name="void"/></require-same-type></return-type>
    <semantics>Require <code>swap()</code> function</semantics>
  </valid-expression>

  <example-model>
    <type name="int"/>
  </example-model>
</concept>