|
Boost Users : |
Subject: Re: [Boost-users] Can not compile a program that uses typeof package by gcc?
From: Peng Yu (pengyu.ut_at_[hidden])
Date: 2008-10-22 17:15:30
>> Do you mean that all multiply_traits shall be defined in a namespace
>> such as B::detail?
>>
>
> Yes. In template libraries you often need namespace scope helper
> classes and functions that should not be visible to the user.
I'm confused. You agreed above that multiply_traits shall be defined
in B::detail. Down below, you said that it's better not to put user
defined code in B::detail, while multiply_traits corresponding to X1,
X2,..., are user defined code.
Then where do I need to put multiply_traits?
>> When new classes X1, X2, ... are defined, I need to define the
>> corresponding multiply_traits in B::detail. If the library B (with
>> namespace B) is designed such that nothing is defined in namespace
>> B::detail, then the users can define whatever they want in B::detail,
>> as there would be no conflicting between their code and the library
>> code, right?
>>
>
> They could, in that the language does not forbid it,
> but I would consider it a bad idea to put user code
> in a namespace nested within a library's namespace.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net