<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>when compiling GiNaC (latest version from git master) with MSVC
(19.29.30139 for x64) it stumbles over the following code in
lst.h/lst.cpp:<br>
</p>
<p>lst.h line 35:<br>
template<> registered_class_info lst::reg_info;</p>
<p>lst.cpp line 28:<br>
template <> GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(lst,
basic,<br>
print_func<print_context>(&lst::do_print).<br>
print_func<print_tree>(&lst::do_print_tree))</p>
<p>and says:</p>
<p>lst.cpp(28): error C2766: explicit specialization; 'reg_info' has
already been defined</p>
<p>exprseq.h/.cpp has the same issue.</p>
<p>A solution seems to be to remove the code in lst.cpp and replace
the code in lst.h with it. That is</p>
<p>lst.h:<br>
template <> GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(lst,
basic,<br>
print_func<print_context>(&lst::do_print).<br>
print_func<print_tree>(&lst::do_print_tree))</p>
<p>This compiles fine and all checks pass, but it does seem wrong to
have the GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T in a header file.</p>
<p>What is the right way to deal with this error?</p>
<p>Thanks,</p>
<p>Jan Rheinländer</p>
<p><br>
</p>
</body>
</html>