summaryrefslogtreecommitdiff
path: root/includes/c++11-surrogates.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-01 12:41:16 -0700
committerPixel <pixel@nobis-crew.org>2012-04-01 12:41:16 -0700
commita4634497c8ada51755249606d8dc4b4c2761c017 (patch)
tree17a969a5f6d4b2be63f8a4a2654445439fc6db41 /includes/c++11-surrogates.h
parent1fdf750ee66ee9e4e872d2810e9ca3bcfa2d555e (diff)
Creating first pass on LuaTasks.
Diffstat (limited to 'includes/c++11-surrogates.h')
-rw-r--r--includes/c++11-surrogates.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/includes/c++11-surrogates.h b/includes/c++11-surrogates.h
new file mode 100644
index 0000000..4f3a1a0
--- /dev/null
+++ b/includes/c++11-surrogates.h
@@ -0,0 +1,21 @@
+#pragma once
+
+namespace Balau {
+
+template <typename T> struct RemoveReference {
+ typedef T type;
+};
+
+template <typename T> struct RemoveReference<T&> {
+ typedef T type;
+};
+
+template <typename T> struct RemoveReference<T&&> {
+ typedef T type;
+};
+
+template <typename T> typename RemoveReference<T>::type&& Move(T&& t) {
+ return static_cast<typename RemoveReference<T>::type&&>(t);
+}
+
+};