aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-22 11:56:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-22 11:56:32 +0200
commit374052af4ad4d1d97d6d86e6db273e7413f2a9b3 (patch)
tree72da6547317a35db1cc41bbadc7d9ebda5b1bcf5
parent43e592013b1dc786cd224ce827cad24f1805ca49 (diff)
Allow implicit conversion of TLS pointers
-rw-r--r--odb/details/posix/tls.hxx5
-rw-r--r--odb/details/tls.hxx12
-rw-r--r--odb/details/win32/tls.hxx5
3 files changed, 12 insertions, 10 deletions
diff --git a/odb/details/posix/tls.hxx b/odb/details/posix/tls.hxx
index 0db3d35..26d9438 100644
--- a/odb/details/posix/tls.hxx
+++ b/odb/details/posix/tls.hxx
@@ -90,10 +90,11 @@ namespace odb
return t.get ();
}
- template <typename T>
+ template <typename T, typename T1>
inline void
- tls_set (tls<T*>& t, T* p)
+ tls_set (tls<T*>& t, T1* p1)
{
+ T* p (p1);
t.set (p);
}
}
diff --git a/odb/details/tls.hxx b/odb/details/tls.hxx
index 2c19081..b47664b 100644
--- a/odb/details/tls.hxx
+++ b/odb/details/tls.hxx
@@ -42,9 +42,9 @@ namespace odb
return p;
}
- template <typename T>
+ template <typename T, typename T1>
inline void
- tls_set (T*& rp, T* p)
+ tls_set (T*& rp, T1* p)
{
rp = p;
}
@@ -69,9 +69,9 @@ namespace odb
return p;
}
- template <typename T>
+ template <typename T, typename T1>
inline void
- tls_set (T*& rp, T* p)
+ tls_set (T*& rp, T1* p)
{
rp = p;
}
@@ -101,9 +101,9 @@ namespace odb
return p;
}
- template <typename T>
+ template <typename T, typename T1>
inline void
- tls_set (T*& rp, T* p)
+ tls_set (T*& rp, T1* p)
{
rp = p;
}
diff --git a/odb/details/win32/tls.hxx b/odb/details/win32/tls.hxx
index 3dcb571..214df66 100644
--- a/odb/details/win32/tls.hxx
+++ b/odb/details/win32/tls.hxx
@@ -104,10 +104,11 @@ namespace odb
return t.get ();
}
- template <typename T>
+ template <typename T, typename T1>
inline void
- tls_set (tls<T*>& t, T* p)
+ tls_set (tls<T*>& t, T1* p1)
{
+ T* p (p1);
t.set (p);
}
}