Hello

I'm trying to update from 3.1.3 to 3.1.6 but the dbo library seg faults with 
3.1.6 (and with latest git).  The backtrace seems to show a problem using 
boost::optional with WDateTime.  Attached is a code which shows the problem.  
I'm running on linux using boost 1.40.

Eric
#include <Wt/Dbo/Session>
#include <Wt/Dbo/backend/Postgres>
#include <Wt/Dbo/Types>
#include <Wt/Dbo/WtSqlTraits>
#include <Wt/Dbo/Impl>
#include <iostream>

namespace dbo = Wt::Dbo;

class Test {
  public:
    int                             value;
    boost::optional<Wt::WDateTime>  timestamp;
    template<class Action>
    void persist(Action& a) {
        dbo::field(a, value,        "value");
        dbo::field(a, timestamp,    "timestamp");
    }
};
DBO_INSTANTIATE_TEMPLATES(Test);

int main()
{   
    dbo::backend::Postgres  postgresConnection("host=127.0.0.1 dbname=testdb user=testuser password=testpw");
    dbo::Session            session;
    session.setConnection(postgresConnection);
    session.mapClass<Test>("test");

    session.createTables();

    dbo::Transaction transaction(session);
    dbo::ptr<Test> test = session.find<Test>().where("value = 0");
    std::cout << "ok";
    return 0;
}

------------------------------------------------------------------------------
Achieve Improved Network Security with IP and DNS Reputation.
Defend against bad network traffic, including botnets, malware, 
phishing sites, and compromised hosts - saving your company time, 
money, and embarrassment.   Learn More! 
http://p.sf.net/sfu/hpdev2dev-nov
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to