Actions
Bug #3343
closedExplicit specialization of DummyClientFace::receive<lp::Nack> relies on undefined behavior
Start date:
11/17/2015
Due date:
% Done:
100%
Estimated time:
0.50 h
Description
The explicit specialization of DummyClientFace::receive
for lp::Nack
appears only in dummy-client-face.cpp
. Users of the class will presumably include the corresponding header file instead, which does not declare any explicit specializations for the function template, thus the compiler will implicitly instantiate the "generic" version. This invokes undefined behavior according to the ISO C++ standard (ยง14.7.3):
If a template, a member template or a member of a class template is explicitly specialized then that specialization
shall be declared before the first use of that specialization that would cause an implicit instantiation
to take place, in every translation unit in which such a use occurs; no diagnostic is required.
Actions