fficxx
fficxx copied to clipboard
Top-level template function
support functions like the following; top-level template functions
template<typename T> std::vector<T> gen_normal_dist(std::size_t n, const RandGenParams<T> ¶ms = { });
Done by #179
HROOT has a problem with this feature. reopened this until the issue is sorted out.
the HROOT build issue was the following:
[239 of 239] Compiling HROOT.Core ( src/HROOT/Core.hs, dist/build/HROOT/Core.p_o )
In file included from csrc/HROOTCoreTColor.cpp:10:0: error:
csrc/HROOTCoreTColor.cpp: In function ‘TArrayI_t* TColor_tColor_GetPalette()’:
csrc/HROOTCoreTColor.h:46:40: error:
error: invalid conversion from ‘const TArrayI*’ to ‘TArrayI*’ [-fpermissive]
46 | return to_nonconst<TArrayI_t, TArrayI>(&(TColor::GetPalette()));\
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| const TArrayI*
|
46 | return to_nonconst<TArrayI_t, TArrayI>(&(TColor::GetPalette()));\
| ^
csrc/HROOTCoreTColor.cpp:25:1: error:
note: in expansion of macro ‘TCOLOR_DEF_NONVIRT’
25 | TCOLOR_DEF_NONVIRT(TColor)
| ^~~~~~~~~~~~~~~~~~
|
25 | TCOLOR_DEF_NONVIRT(TColor)
| ^
In file included from csrc/HROOTCoreTColor.cpp:2:0: error:
/nix/store/8vp2j0mvfx18mzilja6aazxl79bs23sa-fficxx-runtime-0.6/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/fficxx-runtime-0.6-4KxP04WpE1zBFdcmvApGUh/include/MacroPatternMatch.h:27:31: error:
note: initializing argument 1 of ‘ToType* to_nonconst(FromType*) [with ToType = TArrayI_tag; FromType = TArrayI]’
27 | ToType* to_nonconst(FromType* x) {
| ~~~~~~~~~~^
|
27 | ToType* to_nonconst(FromType* x) {
| ^
`cc' failed in phase `C Compiler'. (Exit code: 1)
error: builder for '/nix/store/4rwqvmr2c5kwf9052m2ah4pfc6vsjc0s-HROOT-core-0.10.0.1.drv' failed with exit code 1;
last 10 log lines:
> In file included from csrc/HROOTCoreTColor.cpp:2:0: error:
>
> /nix/store/8vp2j0mvfx18mzilja6aazxl79bs23sa-fficxx-runtime-0.6/lib/ghc-8.6.5/x86_64-linux-ghc-8.6.5/fficxx-runtime-0.6-4KxP04WpE1zBFdcmvApGUh/include/MacroPatternMatch.h:27:31: error:
> note: initializing argument 1 of ‘ToType* to_nonconst(FromType*) [with ToType = TArrayI_tag; FromType = TArrayI]’
> 27 | ToType* to_nonconst(FromType* x) {
> | ~~~~~~~~~~^
> |
> 27 | ToType* to_nonconst(FromType* x) {
> | ^
> `cc' failed in phase `C Compiler'. (Exit code: 1)
For full logs, run 'nix log /nix/store/4rwqvmr2c5kwf9052m2ah4pfc6vsjc0s-HROOT-core-0.10.0.1.drv'.
error: 1 dependencies of derivation '/nix/store/fn56rga13zgahhhb1aghh1anzvd5kq4w-HROOT-0.10.0.1.drv' failed to build