Menu

#826 Compilation failure with Clang

v1.0 (example)
closed-fixed
None
5
2026-02-03
2026-02-03
Gon Solo
No

Compilation with Clang fails, please apply this patch:

diff --git a/src/include/cppduals/duals/dual b/src/include/cppduals/duals/dual
index 4cb227e84..b2750a587 100644
--- a/src/include/cppduals/duals/dual
+++ b/src/include/cppduals/duals/dual
@@ -485,10 +485,6 @@ struct is_arithmetic<duals::dual\<t>> : is_arithmetic<t> {};</t></duals::dual\<t>

#endif // CPPDUALS_ENABLE_IS_ARITHMETIC

-/// Duals are compound types.
-template <class t="">
-struct is_compound<duals::dual\<t>> : true_type {};
-
// Modification of std::numeric_limits<> per
// C++03 17.4.3.1/1, and C++11 18.3.2.3/1.
template <class t=""></class></duals::dual\<t></class>

https://github.com/gonsolo/nixpkgs-review-gha/actions/runs/21591701697/job/62213229286

Discussion

  • Dietmar Warning

    Dietmar Warning - 2026-02-03

    I think it has to be checked with gcc and msc++ too.
    And may be the originator of this library https://tesch1.gitlab.io/cppduals is a better address.

     
  • Gon Solo

    Gon Solo - 2026-02-03

    Just checked with gcc.
    That happens when you vendor libraries.
    https://gitlab.com/tesch1/cppduals/-/issues/14

     
  • Holger Vogt

    Holger Vogt - 2026-02-03

    I have checked the patch with gcc (Cygwin), VS2022, and clang on macOS.
    Seems to be o.k.. As it is a problem in https://sourceforge.net/p/ngspice/discussion/127605/thread/6b4c904415 as well, we should apply it and not wait for CPPDUALS to upgrade.

     
  • Holger Vogt

    Holger Vogt - 2026-02-03
    • status: open --> closed-fixed
    • assigned_to: Holger Vogt
     
  • Holger Vogt

    Holger Vogt - 2026-02-03

    Fixed, pushed to pre-master-46 and master

     

Log in to post a comment.