comp.lang.c++@googlegroups.com | Google Groups | ![]() |
Unsure why you received this message? You previously subscribed to digests from this group, but we haven't been sending them for a while. We fixed that, but if you don't want to get these messages, send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
- Virtual environments - 1 Update
- Question about definition of static template member - 2 Updates
Robert Hutchings <rm.hutchings@gmail.com>: Nov 19 03:49PM -0600 On 11/19/2014 3:26 PM, Melzzzzz wrote: >> Just curious if anyone has used VirtualBox on Ubuntu Linux with a >> Windows 8.1 guest? Did that work OK? > Works. Thanks. |
"Öö Tiib" <ootiib@hot.ee>: Nov 18 11:26PM -0800 On Wednesday, 19 November 2014 03:22:45 UTC+2, DSF wrote: > A. Common to all implementations? > B. Common to implementations where "T" is the same type? > C. Exclusive to each implementation? You use odd term "implementation". What you mean by it? For example there is template class '::dsf::X' that has static data member 'int m'. If somewhere in your program you modify '::dsf::X<int>::m = 42' and '::dsf::X<float>::m = 666' then those must be that for all program from there on. '::dsf::X<int>' and '::dsf::X<float>' are just like any other classes. There must be same definition for those ... and their static members must be same for all program. |
Paavo Helde <myfirstname@osa.pri.ee>: Nov 19 02:08AM -0600 DSF <notavalid@address.here> wrote in > A. Common to all implementations? > B. Common to implementations where "T" is the same type? > C. Exclusive to each implementation? Not sure what you mean by "implementation", but trying to translate: A. Common to all instantiations of the template. B. Common to a single instantiation of the template (with a certain type T). C. Exclusive to an instantiation of the template with a certain type T in each translation unit. (A) is physically impossible because static members may have different types in different instantiations (and may be even absent or refer to e.g. member function names in different specializations). (B) is correct as template classes have external linkage. (C) would be correct if template name would be of internal linkage. However, internal linkage is allowed only for non-member function templates, which obviously cannot have static data members. Cheers Paavo |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment