Skip to content

Commit

Permalink
Fixed typecasts to work with gcc 4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed May 4, 2011
1 parent d2539ea commit 508ff7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions perl++/headers/interpreter.h
Expand Up @@ -5,8 +5,8 @@ namespace perl {
}; };
} }


template<typename T, typename U> auto typecast_to(U&& u) -> decltype(typecast::typemap<T>::cast_to(u)) { template<typename T, typename U> auto typecast_to(U&& u) -> decltype(typecast::typemap<T>::cast_to(std::forward<U>(u))) {
return typecast::typemap<T>::cast_to(u); return typecast::typemap<T>::cast_to(std::forward<U>(u));
} }


class lock { class lock {
Expand Down
2 changes: 1 addition & 1 deletion perl++/headers/typecasts.h
Expand Up @@ -11,7 +11,7 @@ namespace perl {
typedef boost::false_type from_type; typedef boost::false_type from_type;
typedef boost::true_type to_type; typedef boost::true_type to_type;


static const T& cast_to(const T& t) { static T cast_to(T&& t) {
return t; return t;
} }
static const Scalar::Temp cast_from(Interpreter& interp, const T& t) { static const Scalar::Temp cast_from(Interpreter& interp, const T& t) {
Expand Down

0 comments on commit 508ff7d

Please sign in to comment.