I have a template class that uses some boost functions in it. Because this class is a template, its method must be implemented in the header file. I use some using declarations to make the code more readable:
namespace network { namespace v1 { namespace detail { using boost::phoenix::if_; using boost::for_each; template <class T> class Some { public: Some() { for_each(inVector, ); } private: vector<int> intVector; }; } template <class T> using Some = detail::Some<T>; } }
Is it possible to use using in the header this way? I don't think anyone ever used using namespace network::v1::detail; in the .cpp file, so I do not expect functions added to the part namespace to cause any name collisions. I'm wrong?
source share