eina_cxx: Fix compatibility between eina::optionals of convertible types
authorVitor Sousa <vitorsousasilva@gmail.com>
Fri, 13 Feb 2015 01:22:50 +0000 (23:22 -0200)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Tue, 14 Apr 2015 04:06:57 +0000 (01:06 -0300)
commit5619c6bc8dff95865ddc412d0d5f161dc33f7fcf
treef63d65a43ae1252a5dc2f91074968619fbd0fe8f
parent5043dcb830e96aa11b04e3bebc935c1c4cc606f2
eina_cxx: Fix compatibility between eina::optionals of convertible types

Now an eina::optional that wraps a specific type can be constructed or
have content assigned to it using another eina::optional that wraps a
different type, provided that the two wrapped types are convertible
between each other.

Added "disengage" member function to be able to disengage a R-value
eina::optional of different contained type.
It also adds for increased convenience.

Fix constructing an engaged eina::optional from an disengaged one.

Fix small assertion problem of trying to construct an eina::optional
already flagged as engaged.

Fix incorrect use of std::move. Changed it to std::forward.

Added constexpr property for trivial constructors.

Added auxiliary function "make_optional".

Added unit test to check compatibility between eina::optionals of
convertible types.
src/bindings/eina_cxx/eina_optional.hh
src/tests/eina_cxx/eina_cxx_test_optional.cc