Boost 1.61.0 and boost::optional
When using Boost 1.61 there is the following compilation error:
/usr/local/include/boost/optional/detail/optional_reference_spec.hpp:97:78: error: 'ptr_' is a private member of 'boost::optional<MeshLib::PropertyVector<unsigned long> &>'
explicit optional(const optional<U&>& rhs) BOOST_NOEXCEPT : ptr_(rhs.ptr_) {}
^
/Users/bilke/code/ogs6/ogs/MeshLib/MeshEditing/AddLayerToMesh.cpp:135:66: note: in instantiation of function template specialization 'boost::optional<const MeshLib::PropertyVector<unsigned long> &>::optional<MeshLib::PropertyVector<unsigned long> >' requested here
boost::optional<MeshLib::PropertyVector<std::size_t> const&> opt_node_id_pv(
^
/usr/local/include/boost/optional/detail/optional_reference_spec.hpp:83:8: note: implicitly declared private here
T* ptr_;
In 1.61 there are some changes in boost::optional
. See the changelog:
- all run-time bugs caused by incorrect reference binding on some compilers are now turned into compile-time errors