Skip to content
Snippets Groups Projects
Forked from Core Modules / dune-common
Source project has a limited visibility.
  • Carsten Gräser's avatar
    b351862d
    Remove constructor for FV<K1,n> from FV<K2,m> with n!=m · b351862d
    Carsten Gräser authored
    This patch removes the constructor from the overload set.
    Before the constructor was there but failed to compile
    due to the static assertion.
    
    If you have methods f(K) and f(FieldVector<K,n>) with
    n>1 the overload was ambigous when calling f() with
    a FieldVector<K,1> because there is a conversion
    from this to FieldVector<K,n> - even if it does not
    compile due to the failing static assertion.
    
    Now this is avoided using SFINAE. This fixes fs#1024. 
    
    [[Imported from SVN: r6680]]
    b351862d
    History
    Remove constructor for FV<K1,n> from FV<K2,m> with n!=m
    Carsten Gräser authored
    This patch removes the constructor from the overload set.
    Before the constructor was there but failed to compile
    due to the static assertion.
    
    If you have methods f(K) and f(FieldVector<K,n>) with
    n>1 the overload was ambigous when calling f() with
    a FieldVector<K,1> because there is a conversion
    from this to FieldVector<K,n> - even if it does not
    compile due to the failing static assertion.
    
    Now this is avoided using SFINAE. This fixes fs#1024. 
    
    [[Imported from SVN: r6680]]