[PATCH] D15432: [libcxx] Move member function definition before it's explicit template instantiation declaration in <valarray> to satisfy GCC.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 17:46:36 PST 2015


EricWF abandoned this revision.
EricWF added a comment.

Another fix was committed as r255599. It simply puts the inline keyword on the declaration of the methods so that they are allowed to be inlined.

14.7.2 [temp.explicit]p10

> Except for inline functions, declarations with types deduced from their initializer or return value (7.1.6.4),

> const variables of literal types, variables of reference types, and class template specializations, explicit

> instantiation declarations have the effect of suppressing the implicit instantiation of the entity to which they

> refer. [ Note: The intent is that an inline function that is the subject of an explicit instantiation declaration

> will still be implicitly instantiated when odr-used (3.2) so that the body can be considered for inlining, but

> that no out-of-line copy of the inline function would be generated in the translation unit. — end note ]



http://reviews.llvm.org/D15432





More information about the cfe-commits mailing list