Would be better to have a traits to get the type of locks like:
typedef typename lock_categories<mutex>::lock Guard;
typedef typename lock_categories<mutex>::trylock TryGuard;
typedef typename lock_categories<mutex>::timedlock TimedGuard;

I did a quick search in boost archive and did not see a discussion on
that in both discussion phases(one was last summer, the other is since
last week). Maybe I missed it.