aboutsummaryrefslogtreecommitdiff
path: root/odb/details
diff options
context:
space:
mode:
Diffstat (limited to 'odb/details')
-rw-r--r--odb/details/buffer.hxx6
-rw-r--r--odb/details/function-wrapper.txx5
-rw-r--r--odb/details/transfer-ptr.hxx2
-rw-r--r--odb/details/unique-ptr.hxx4
4 files changed, 12 insertions, 5 deletions
diff --git a/odb/details/buffer.hxx b/odb/details/buffer.hxx
index 394d96e..558be9b 100644
--- a/odb/details/buffer.hxx
+++ b/odb/details/buffer.hxx
@@ -65,13 +65,17 @@ namespace odb
return static_cast<T*> (data_);
}
+ // Note that strictly speaking the return type should be void* const*
+ // but that would make using this function too awkward since we often
+ // store the result as void*.
+ //
void**
data_ptr ()
{
return &data_;
}
- const void**
+ const void* const*
data_ptr () const
{
return &data_;
diff --git a/odb/details/function-wrapper.txx b/odb/details/function-wrapper.txx
index 19e4cbc..db73e8d 100644
--- a/odb/details/function-wrapper.txx
+++ b/odb/details/function-wrapper.txx
@@ -67,7 +67,10 @@ namespace odb
}
else
{
- function = reinterpret_cast<F*> (&caller_impl<F>::function);
+ function_wrapper<decltype (caller_impl<F>::function)> fw (
+ &caller_impl<F>::function);
+
+ function = fw.template cast<F*> ();
deleter = &deleter_impl<F>;
std_function = new std_function_type (std::move (sf));
}
diff --git a/odb/details/transfer-ptr.hxx b/odb/details/transfer-ptr.hxx
index 2ee0752..4b63df6 100644
--- a/odb/details/transfer-ptr.hxx
+++ b/odb/details/transfer-ptr.hxx
@@ -49,7 +49,7 @@ namespace odb
transfer_ptr& operator= (const transfer_ptr&);
public:
- transfer_ptr (transfer_ptr&& p): p_ (p.transfer ()) {}
+ transfer_ptr (transfer_ptr&& p) noexcept: p_ (p.transfer ()) {}
#endif
~transfer_ptr () {delete p_;}
diff --git a/odb/details/unique-ptr.hxx b/odb/details/unique-ptr.hxx
index 6663c30..06b2c76 100644
--- a/odb/details/unique-ptr.hxx
+++ b/odb/details/unique-ptr.hxx
@@ -22,8 +22,8 @@ namespace odb
~unique_ptr () {delete p_;}
#ifdef ODB_CXX11
- unique_ptr (unique_ptr&& p): p_ (p.p_) {p.p_ = 0;}
- unique_ptr& operator= (unique_ptr&& p)
+ unique_ptr (unique_ptr&& p) noexcept: p_ (p.p_) {p.p_ = 0;}
+ unique_ptr& operator= (unique_ptr&& p) noexcept
{
if (this != &p)
{