Topic: Storage class specifiers in template definitions (was: ? inline in...)
Author: rfg@netcom.com (Ronald F. Guilmette)
Date: Sun, 15 Aug 1993 21:47:33 GMT Raw View
In article <26309@alice.att.com> ark@alice.UUCP () writes:
>Others said `No: inline implies static, so it should mean the same as
>
> extern static void f() { /* ... */ }
Speaking of which, I just found something most unexpected in the examples
(available on the net) for Stan Lippman's book.
In one file I found something like:
template < class T > static void swap (T& arg1, T& arg2) { /* ... */ }
^^^^^^
Looking at the grammar, it appears that this is perfectly valid (even tho
one C++ compiler I have access to rejects it). But what are the exact
semantics of a declaration like this???
And what are the semantics if I were to change that `static' to `extern'?
Then what would the declaration mean? How about if I made that `inline'?
Then what?
--
-- Ronald F. Guilmette ------------------------------------------------------
------ domain address: rfg@netcom.com ---------------------------------------
------ uucp address: ...!uunet!netcom.com!rfg -------------------------------