Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed typecasts to work with gcc 4.5

  • Loading branch information...
commit 508ff7d1478f578201b0f88648d5c8eef3d7d059 1 parent d2539ea
Leon Timmermans authored May 04, 2011
4  perl++/headers/interpreter.h
@@ -5,8 +5,8 @@ namespace perl {
5 5
 		};
6 6
 	}
7 7
 
8  
-	template<typename T, typename U> auto typecast_to(U&& u) -> decltype(typecast::typemap<T>::cast_to(u)) {
9  
-		return typecast::typemap<T>::cast_to(u);
  8
+	template<typename T, typename U> auto typecast_to(U&& u) -> decltype(typecast::typemap<T>::cast_to(std::forward<U>(u))) {
  9
+		return typecast::typemap<T>::cast_to(std::forward<U>(u));
10 10
 	}
11 11
 
12 12
 	class lock {
2  perl++/headers/typecasts.h
@@ -11,7 +11,7 @@ namespace perl {
11 11
 			typedef boost::false_type from_type;
12 12
 			typedef boost::true_type to_type;
13 13
 
14  
-			static const T& cast_to(const T& t) {
  14
+			static T cast_to(T&& t) {
15 15
 				return t;
16 16
 			}
17 17
 			static const Scalar::Temp cast_from(Interpreter& interp, const T& t) {

0 notes on commit 508ff7d

Please sign in to comment.
Something went wrong with that request. Please try again.