<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Richard,</p>
<p>that was MSVC from Visual Studio 2019. But the same happens with
19.30.30706 from VS 2022. Also, past experience shows that MSVC is
very strict (you might say pedantic) about the standard. So I have
little hope that the problem will go away with a new version of
MSVC. The <a moz-do-not-send="true"
href="https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2766?view=msvc-170">help
page for error 2766</a> says "Duplicate explicit specializations
are not allowed". Though looking at the <a moz-do-not-send="true"
href="https://www.ginac.de/pipermail/ginac-devel/2021-February/002539.html">thread</a>
you cited it would seem that the code in the header should be
viewed as a declaration, not a definition:</p>
<pre><i>>> According to 14.7.3.13
</i>>><i> "An explicit specialization of a static data member of a template is
</i>>><i> a definition if the declaration includes an initializer; otherwise,
</i>>><i> it's a declaration."</i></pre>
<p>On the other hand, looking at structure.h, it does assign a value
to reg_info in the header file. So maybe the solution I suggested
(move GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T to the header) is not
that bad after all?</p>
<p>structure.h line 242:</p>
<p><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">template
<class T, template <class> class CP>
</span><br>
registered_class_info structure<T, CP>::reg_info =
registered_class_info(registered_class_options(structure::get_class_name(),
"basic", typeid(structure<T, CP>)));<br>
<br>
</span></p>
<div class="moz-cite-prefix">Jan</div>
<div class="moz-cite-prefix"><br>
</div>
</body>
</html>