From c2bb4633ac31e1933908dc73476ce9ddffff8dad Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Oct 2010 18:21:39 +0200 Subject: Add support for persistent classes without default ctors New test: common/ctor. --- common/ctor/test.hxx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 common/ctor/test.hxx (limited to 'common/ctor/test.hxx') diff --git a/common/ctor/test.hxx b/common/ctor/test.hxx new file mode 100644 index 0000000..3d08ed0 --- /dev/null +++ b/common/ctor/test.hxx @@ -0,0 +1,31 @@ +// file : common/ctor/test.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include + +#include + +#pragma db object +struct person +{ + person (const std::string& first, + const std::string& last, + unsigned short age) + : first_ (first), last_ (last), age_ (age) + { + } + + #pragma db id auto + unsigned long id_; + + std::string first_; + std::string last_; + unsigned short age_; +}; + +#endif // TEST_HXX -- cgit v1.1