[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic computations branch, master, updated. release_1-4-0-709-gf271f67d
    Alexey Sheplyakov 
    asheplyakov at yandex.ru
       
    Mon Feb  8 12:04:34 CET 2021
    
    
  
Richard,
On 2/3/21 6:50 PM, Richard B. Kreckel via GiNaC-devel wrote:
> commit f271f67d2fc798079326e450bc0e53eb80fb2e96
> Author: Richard Kreckel <kreckel at ginac.de>
> Date:   Wed Feb 3 14:40:49 2021 +0100
> 
>      Avoid "instantiation of variable 'reg_info' required..." warning.
>      
>      With -Wundefined-var-template (on by default), CLang++ warns that
>      no definition for the static 'reg_info' member variable is available.
> 
The patch confuses me a bit.
Firstly, the compiler has complained about missing instantiation,
and you've provided (an explicit) specialization instead. Yet
the compiler seems to be happy.
Secondly this
/** Definition of container::reg_info for exprseq. */
template<> registered_class_info exprseq::reg_info;
is a declaration, not definition. According to 14.7.3.13
"An explicit specialization of a static data member of a template is
a definition if the declaration includes an initializer; otherwise,
it's a declaration."
Best regards,
    Alexey
    
    
More information about the GiNaC-devel
mailing list