Open giesmininkas opened 3 years ago
Maybe obvious but, Ill try. Didnt you by any chance use "using namespace", effectively disabling the different namespaces?
Maybe obvious but, Ill try. Didnt you by any chance use "using namespace", effectively disabling the different namespaces?
HI. No, I did not use "using namespace". The errors occur in the example posted above. It's enough to just "include" both asio flavors.
"Can Asio and Boost.Asio coexist in the same program? Yes. Since they use different namespaces there should be no conflicts, although obviously the types themselves are not interchangeable."
This means that you can use Boost.Asio in separate compilation units and link them together, but you can't rely on importing them into the same compilation unit.
I thought everything for Boost.ASIO is put in its own namespace? With this issue it's not possible to include ASIO and for example Boost.Process in one translation unit because the latter one includes Boost.ASIO.
Hi.
When trying to use both Boost and non-Boost versions of asio, it fails to compile with multitude of
target of using declaration conflicts with declaration already in scope
andredefinition of '*'
errors. I checked it with Boost 1.74.0 and asio >=1.18.0.I was hoping this would work, since asio documentation says "Can Asio and Boost.Asio coexist in the same program? Yes. Since they use different namespaces there should be no conflicts, although obviously the types themselves are not interchangeable."
Is this an expected behaviour? Could someone suggest a workaround to be able to use both versions together?
Steps to recreate:
Thank you in advance.