]> git.saurik.com Git - wxWidgets.git/blame - include/wx/meta/removeref.h
Fix wrong tab order in wxAuiNotebook after dragging.
[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
6// RCS-ID: $Id$
7// Copyright: (c) 2012 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_META_REMOVEREF_H_
12#define _WX_META_REMOVEREF_H_
13
8f6bb260 14// wxRemoveRef<> is similar to C++11 std::remove_reference<> but works with all
32753ae9
VZ
15// compilers (but, to compensate for this, doesn't work with rvalue references).
16
8f6bb260
VZ
17// Except that it doesn't work with VC++ 6 as there doesn't seem to be any way
18// to partially specialize a template for references with it.
19#ifndef __VISUALC6__
20
32753ae9
VZ
21template <typename T>
22struct wxRemoveRef
23{
24 typedef T type;
25};
26
27template <typename T>
28struct wxRemoveRef<T&>
29{
30 typedef T type;
31};
32
8f6bb260
VZ
33#define wxHAS_REMOVEREF
34
35#endif // !__VISUALC6__
36
32753ae9 37#endif // _WX_META_REMOVEREF_H_