]> git.saurik.com Git - wxWidgets.git/blame - include/wx/meta/removeref.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / meta / removeref.h
CommitLineData
32753ae9
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/meta/removeref.h
3// Purpose: Allows to remove a reference from a type.
4// Author: Vadim Zeitlin
5// Created: 2012-10-21
32753ae9
VZ
6// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_META_REMOVEREF_H_
11#define _WX_META_REMOVEREF_H_
12
8f6bb260 13// wxRemoveRef<> is similar to C++11 std::remove_reference<> but works with all
32753ae9
VZ
14// compilers (but, to compensate for this, doesn't work with rvalue references).
15
8f6bb260
VZ
16// Except that it doesn't work with VC++ 6 as there doesn't seem to be any way
17// to partially specialize a template for references with it.
18#ifndef __VISUALC6__
19
32753ae9
VZ
20template <typename T>
21struct wxRemoveRef
22{
23 typedef T type;
24};
25
26template <typename T>
27struct wxRemoveRef<T&>
28{
29 typedef T type;
30};
31
8f6bb260
VZ
32#define wxHAS_REMOVEREF
33
34#endif // !__VISUALC6__
35
32753ae9 36#endif // _WX_META_REMOVEREF_H_