diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-19 10:47:40 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-10-21 19:05:53 +0200 |
commit | 6e7b115c7d136c6d99984eaae21e2404a948d550 (patch) | |
tree | 0e4db374c4771de9a4d60d8e24d8324a3ec1ee8b | |
parent | 2c44802ec25744ba351536a41f3ffc28d56282be (diff) |
Add support for const data members
Const data members are automatically treated as readonly. New test:
const-member.
-rw-r--r-- | odb/pgsql/traits.hxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/odb/pgsql/traits.hxx b/odb/pgsql/traits.hxx index 58602bf..b4b6a11 100644 --- a/odb/pgsql/traits.hxx +++ b/odb/pgsql/traits.hxx @@ -146,7 +146,7 @@ namespace odb struct wrapped_value_traits<W, ID, false> { typedef wrapper_traits<W> wtraits; - typedef typename wtraits::wrapped_type wrapped_type; + typedef typename wtraits::unrestricted_wrapped_type wrapped_type; typedef W value_type; typedef wrapped_type query_type; @@ -207,7 +207,10 @@ namespace odb } static void - set_image (details::ubuffer& b, std::size_t& n, bool& is_null, const W& v) + set_image (details::ubuffer& b, + std::size_t& n, + bool& is_null, + const W& v) { vtraits::set_image (b, n, is_null, wtraits::get_ref (v)); } @@ -231,7 +234,7 @@ namespace odb struct wrapped_value_traits<W, ID, true> { typedef wrapper_traits<W> wtraits; - typedef typename wtraits::wrapped_type wrapped_type; + typedef typename wtraits::unrestricted_wrapped_type wrapped_type; typedef W value_type; typedef wrapped_type query_type; |