diff options
Diffstat (limited to 'odb-tests/common/ctor/test.hxx')
-rw-r--r-- | odb-tests/common/ctor/test.hxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/odb-tests/common/ctor/test.hxx b/odb-tests/common/ctor/test.hxx new file mode 100644 index 0000000..2a2becd --- /dev/null +++ b/odb-tests/common/ctor/test.hxx @@ -0,0 +1,29 @@ +// file : common/ctor/test.hxx +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef TEST_HXX +#define TEST_HXX + +#include <string> + +#include <odb/core.hxx> + +#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 |