> > Requiring C++11 also simplifies some code - as you saw, I left in some
> > std::shared_ptrs around instead of log4cxx::pointer, but the code that
> > detects for C++ wouldn't be needed if we can assume that it already
> > exists(some detection code for C++14/17 features would still be
> > required).
>
> So remove the boost-switches for C++11-features entirely and switch
> to plain C++ instead? Mixing std::shared_ptr with log4cxx::shared_ptr
> doesn't sound like a too good idea to me. It's not too many
> std::shared_ptr to change as well.
>

In terms of leaving the 'std::shared_ptr in', what I meant was that I
accidentally left those in when I was doing my conversion.

As for removing them completely, it depends on what we want to do.
Personally, I don't like typedefs too much(see some thoughts from
Linus Torvalds[1] for some more information).  it's a bit more typing,
but I prefer to do something like:
    std::shared_ptr<log4cxx::Logger> logger = ....
instead of
    log4cxx::LoggerPtr logger = ...
since it makes it more obvious to me what the type is.

Removing the typedefs would break a lot of existing code that depends
on LoggerPtr though, so I would be fine just typedef-ing the pointers
with the macros that we have now, but permanently typedef-ing to
std::shared_ptr(no utilization of boost fallback behavior).

-Robert Middleton

[1]: https://yarchive.net/comp/linux/typedefs.html

Reply via email to