
"Gennadiy Rozental" <gennadiy.rozental@thomson.com> writes:
I do undersand that. But I still believe that trait specification is part of definition.
Not if you want to describe the properties of some 3rd-party class:
#include <3rd_party/smart_ptr.hpp>
template <class T> struct is_dereferenceable<third_party::smart_ptr<T> > : mpl::true {};
I imagine you wouldn't do it 10 times in your code and most definetlety you wouln't define it differently in different headers. Most probable you introduce 3rd_party_smart_ptr_wrap.hpp that contains above trait specification and use everywhere instead of 3rd_party/smart_ptr.hpp. So in this case from my POV you *updated* smart_ptr definition and use this updated definition instead of original one.
So if I write a free function that accepts third_party::smart_ptr<T> arguments I'm also updating the smart_ptr definition? You must have a funny definition of "definition". -- Dave Abrahams Boost Consulting www.boost-consulting.com