4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief Tags public header */
26 #ifndef HH_SENF_Utils_Tags_
27 #define HH_SENF_Utils_Tags_ 1
32 //-/////////////////////////////////////////////////////////////////////////////////////////////////
34 /** \defgroup utils_tags Type tags
36 Type tags are used to select variants of a member, function, template or constructor. A Type tag
37 always has only a single value which is passed wherever a parameter of that tag's type is
40 The argument which expects a type-tag value will always be declared in such a way, that it is
41 optional. Examples of type tag use are:
44 result = object.find<Foo>(); // This call may throw
45 result = object.find<Foo>(senf::nothrow); // This call will not throw
48 Of course, this only works with objects which explicitly declare, that they take an optional
49 senf::NoThrow_t type parameter.
54 /** \brief Type tag selecting non-throwing variant of something
56 This tag is used to select the non-throwing variant of a member, function, template or
57 constructor. An argument of this type is always declared in such a way, that it is
60 There is only a single value for this type: \ref senf::nothrow which is the value to pass
61 wherever an (optional) senf::NoThrow_t parameter is requested.
65 enum NoThrow_t { nothrow };
67 /** \brief Type tag selecting uninitialized variant of something
69 This tag is used to select the unititialized variant of a member, function, template or
70 constructor (mostly a constructor). An argument of this type is always declared in such a
71 way, that it is optional.
73 There is only a single value for this type: \ref senf::noinit which is the value to pass
74 wherever an (optional) senf::NoInit_t parameter is requested.
78 enum NoInit_t { noinit };
82 //-/////////////////////////////////////////////////////////////////////////////////////////////////
93 // c-file-style: "senf"
94 // indent-tabs-mode: nil
95 // ispell-local-dictionary: "american"
96 // compile-command: "scons -u test"