These are chat archives for symengine/symengine

28th
Jan 2017
Isuru Fernando
@isuruf
Jan 28 2017 14:24
#include <iostream>

struct foo {
    int i;
};

struct bar: foo {
    int j;
};

void func(const bar &t) {
    std::cout << "Calling func(const bar &t)" << std::endl;
}

template <typename T>
void func(const T &t, typename std::enable_if<std::is_base_of<foo, T>::value>::type * = nullptr) {
    std::cout << "Calling func(const T &t, ...)" << std::endl;
}

int main() {
    func(bar());
}
@bluescarni, why doesn't the above cpp file give an ambiguous method error for func?
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:38
Hey @isuruf I'm on right now if you want to work through the build issue.
It's a Microsoft Surface so it may be weird, but it is a Core i5 version.
Isuru Fernando
@isuruf
Jan 28 2017 18:38
This one's using Conda and we've switched to Binaries on master
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:39
oh okay
so just try master?
Isuru Fernando
@isuruf
Jan 28 2017 18:39
C:\Users\ChrisRack\.julia\v0.5\SymEngine\deps\usr\Scripts\conda.bat search symengine --json
what does above give you?
Yes, master should work. If you don't mind, I'd like to know why Conda failed as well. Just out of curiosity
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:40
I understand :smile:
huh
that just returns ()
Isuru Fernando
@isuruf
Jan 28 2017 18:42
what happens when you change conda.bat to conda.exe?
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:44
not recognized
Isuru Fernando
@isuruf
Jan 28 2017 18:46
Ah, okay
Can you try master?
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:47
sure thing
Isuru Fernando
@isuruf
Jan 28 2017 18:47
I'll tag a new version once I figure out this ambiguous error on Julia v0.6
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:48
is it a new world error?
I saw something with those
Isuru Fernando
@isuruf
Jan 28 2017 18:48
No, those were fixed temporarily
Expression: diff(ex,x,2) == diff(diff(ex,x),x)
  MethodError: convert(::Type{SymEngine.BasicType}, ::SymEngine.BasicType{Val{:Symbol}}) is ambiguous. Candidates:
    convert{T<:SymEngine.BasicType}(::Type{T}, val::Number) in SymEngine at /home/travis/.julia/v0.6/SymEngine/src/types.jl:200
    convert{T}(::Type{T}, x::T) in Base at essentials.jl:29
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:50
oh yeah
those are showing up more on v0.6
I donno why
I know it was mentioned in some issues
I think the broadcasting ones.
or the type system changes
master is good
Isuru Fernando
@isuruf
Jan 28 2017 18:53
Great. thanks for checking
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 18:55
No problem
Isuru Fernando
@isuruf
Jan 28 2017 19:07
Fixed it. Tests pass on v0.6
Christopher Rackauckas
@ChrisRackauckas
Jan 28 2017 19:09
:sparkles: