~ubuntu-branches/debian/sid/boost1.49/sid

« back to all changes in this revision

Viewing changes to libs/type_traits/doc/remove_pointer.qbk

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2012-02-26 00:31:44 UTC
  • Revision ID: package-import@ubuntu.com-20120226003144-eaytp12cbf6ubpms
Tags: upstream-1.49.0
ImportĀ upstreamĀ versionĀ 1.49.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[/ 
 
2
  Copyright 2007 John Maddock.
 
3
  Distributed under the Boost Software License, Version 1.0.
 
4
  (See accompanying file LICENSE_1_0.txt or copy at
 
5
  http://www.boost.org/LICENSE_1_0.txt).
 
6
]
 
7
 
 
8
[section:remove_pointer remove_pointer]
 
9
 
 
10
   template <class T>
 
11
   struct remove_pointer
 
12
   {
 
13
      typedef __below type;
 
14
   };
 
15
  
 
16
__type The same type as `T`, but with any pointer modifier removed.  Note that pointers to members are left unchanged: 
 
17
removing the pointer decoration would result in an invalid type.
 
18
 
 
19
__std_ref 8.3.1.
 
20
 
 
21
__compat If the compiler does not support partial specialization of class-templates
 
22
then this template will compile, but the member `type` will always be the same as 
 
23
type `T` except where __transform_workaround have been applied.
 
24
 
 
25
__header ` #include <boost/type_traits/remove_pointer.hpp>` or ` #include <boost/type_traits.hpp>`
 
26
 
 
27
[table Examples
 
28
 
 
29
[ [Expression] [Result Type]]
 
30
 
 
31
[[`remove_pointer<int>::type`][`int`]]
 
32
 
 
33
[[`remove_pointer<int const*>::type`] [`int const`]]
 
34
 
 
35
[[`remove_pointer<int const**>::type`] [`int const*`]]
 
36
 
 
37
[[`remove_pointer<int&>::type`] [`int&`]]
 
38
 
 
39
[[`remove_pointer<int*&>::type`] [`int*&`]]
 
40
 
 
41
]
 
42
 
 
43
[endsect]
 
44