c++/boost/gnc_numeric question

Geert Janssens geert.gnucash at kobaltwit.be
Sat Jan 14 07:47:38 EST 2017


Op zaterdag 14 januari 2017 12:54:42 CET schreef Geert Janssens:
> The failure is in this line:
>     if ((m_deposit == boost::none) &&
>         (m_withdrawal == boost::none))
> with both m_deposit and m_withdrawal being of type
> boost::optional<gnc_numeric>.

Well, duh.

Sometimes one is too involved to see clearly. This part can easily be fixed by 
rewriting it to
    if (!m_deposit == boost::none && !m_withdrawal == boost::none)

The questions regarding GncRational still remain though.

Geert


More information about the gnucash-devel mailing list