boostorg / leaf

Lightweight Error Augmentation Framework
Boost Software License 1.0
313 stars 48 forks source link

Fix namespace error.hpp #21

Closed museghost closed 3 years ago

museghost commented 3 years ago

To use BOOST_LEAF_NEW_ERROR macro, it should be declared as below in user's source or header file. Without them, the macro is not working.

//  leaf issue, BOOST_LEAF_NEW_ERROR macro, ::leaf::
namespace leaf = boost::leaf;

For using LEAF without it, "::boost::" would be added in below namespace.

As-is:

#define BOOST_LEAF_NEW_ERROR ::leaf::leaf_detail::inject_loc{__FILE__,__LINE__,__FUNCTION__}+::boost::leaf::new_error

To-be:

#define BOOST_LEAF_NEW_ERROR ::boost::leaf::leaf_detail::inject_loc{__FILE__,__LINE__,__FUNCTION__}+::boost::leaf::new_error
zajo commented 3 years ago

I fixed this already in develop, thank you!