aboutsummaryrefslogtreecommitdiff
path: root/boost/common/smart-ptr/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'boost/common/smart-ptr/test.hxx')
-rw-r--r--boost/common/smart-ptr/test.hxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/boost/common/smart-ptr/test.hxx b/boost/common/smart-ptr/test.hxx
index 575c2e2..62a9ae6 100644
--- a/boost/common/smart-ptr/test.hxx
+++ b/boost/common/smart-ptr/test.hxx
@@ -6,13 +6,17 @@
#ifndef TEST_HXX
#define TEST_HXX
+#include <string>
#include <vector>
+#include <boost/shared_ptr.hpp>
+
#include <odb/core.hxx>
#include <odb/boost/smart-ptr/lazy-ptr.hxx>
struct obj;
+using boost::shared_ptr;
using odb::boost::lazy_shared_ptr;
using odb::boost::lazy_weak_ptr;
@@ -56,4 +60,25 @@ struct obj
lazy_shared_ptr<cont> c;
};
+// Test shared_ptr as a value wrapper.
+//
+#pragma db object
+struct obj2
+{
+ obj2 ()
+ {
+ }
+
+ obj2 (unsigned long id)
+ : id (id)
+ {
+ }
+
+ #pragma db id
+ unsigned long id;
+
+ #pragma db null
+ shared_ptr<std::string> str;
+};
+
#endif // TEST_HXX