Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #13333

Re: Typedef of inaccessible type

From ales.pergl@gmail.com
Newsgroups comp.lang.c++
Subject Re: Typedef of inaccessible type
Date 2012-01-13 07:00 -0800
Organization http://groups.google.com
Message-ID <2860857.953.1326466829576.JavaMail.geo-discussion-forums@vbtv21> (permalink)
References <29510730.1476.1326458883399.JavaMail.geo-discussion-forums@yqni15> <jepds4$tth$1@dont-email.me>

Show all headers | View raw


> But if you make it accessible in some way, then you would be breaking 
> the rules you have elaborately set up with the class nesting.

Naturally, I want to expose the type names only to the limited scope of the .cpp file where member definitions reside. So I'm not trying to void my elaborate privilege setup. ;)

> You can always confer friendship to some class that can then provide 
> typedefs.

I could do that, but that would require me to put in the header file what are essentially implementation details of the classes. Furthermore, it would not bring many benefits with regard to code verbosity/readability.

> But then you would be exposing what you have gone to pains to make 
> inacessible.

... but only to the friendly class, which would be OK. But again, it wouldn't be less verbose nor more readable.

> There's nothing wrong with using the preprocessor in a sensible way, 
> like in your case, with the effect confined within a separately compiled 
> file.

I agree.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Typedef of inaccessible type ales.pergl@gmail.com - 2012-01-13 04:48 -0800
  Re: Typedef of inaccessible type "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-13 15:07 +0100
    Re: Typedef of inaccessible type ales.pergl@gmail.com - 2012-01-13 07:00 -0800
      Re: Typedef of inaccessible type "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-13 16:52 +0100
        Re: Typedef of inaccessible type ales.pergl@gmail.com - 2012-01-16 07:19 -0800
      Re: Typedef of inaccessible type jgk@panix.com (Joe keane) - 2012-01-16 16:13 +0000
  Re: Typedef of inaccessible type Markku Linnoskivi <markku.linnoskivi@gmail.com> - 2012-01-13 06:09 -0800
    Re: Typedef of inaccessible type Victor Bazarov <v.bazarov@comcast.invalid> - 2012-01-13 10:54 -0500
  Re: Typedef of inaccessible type Leigh Johnston <leigh@i42.co.uk> - 2012-01-13 14:32 +0000
    Re: Typedef of inaccessible type Leigh Johnston <leigh@i42.co.uk> - 2012-01-13 14:38 +0000
      Re: Typedef of inaccessible type "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-01-13 15:46 +0100
        Re: Typedef of inaccessible type Leigh Johnston <leigh@i42.co.uk> - 2012-01-13 14:53 +0000
    Re: Typedef of inaccessible type ales.pergl@gmail.com - 2012-01-13 06:42 -0800
      Re: Typedef of inaccessible type Leigh Johnston <leigh@i42.co.uk> - 2012-01-13 15:04 +0000
        Re: Typedef of inaccessible type Leigh Johnston <leigh@i42.co.uk> - 2012-01-13 15:19 +0000

csiph-web