<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div class="" style="word-wrap:break-word">
<div class="">Hello again, Dune!</div>
<div class=""><br class="">
</div>
Yesterday I promised:
<div>
<blockquote type="cite" class="">
<div class="">I will try to provide a minimal example tomorrow. </div>
</blockquote>
<br class="">
</div>
<div>This is the minimal example. I compiled with the following command line (from my dune-common directory):</div>
<div><br class="">
</div>
<div>
<div class="" style="margin:0px; font-size:13px; font-family:Courier; background-color:rgb(255,250,187)">
clang++ -std=c++11 -I. -o adlfail adlfail.cpp build-cmake/lib/libdunecommon.a</div>
</div>
<div><br class="">
</div>
<div>The version of clang is</div>
<div><br class="">
</div>
<div>
<div class="" style="margin:0px; font-size:13px; font-family:Courier; background-color:rgb(255,250,187)">
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)</div>
<div class=""><br class="">
</div>
</div>
<div>The source code to adlfail.cpp follows below. With current master, the include can be moved below Num</div>
<div>(currently commented out) to compile successfully, with the patch applied it does not matter (and the</div>
<div>absreal needs only to be defined in namespace Foobar).</div>
<div><br class="">
</div>
<div>I have also attached a new patch to this email, the only difference is that this is against the master branch.</div>
<div><br class="">
</div>
<div>Atgeirr</div>
<div><br class="">
</div>
<div>========================================</div>
<div>
<div>#include <dune/common/fmatrix.hh></div>
<div><br class="">
</div>
<div>namespace Foobar</div>
<div>{</div>
<div> struct Num</div>
<div> {</div>
<div> Num() {}</div>
<div> Num(double) {}</div>
<div> Num operator+(Num) const { return Num(); }</div>
<div> Num operator-(Num) const { return Num(); }</div>
<div> Num operator*(Num) const { return Num(); }</div>
<div> Num operator/(Num) const { return Num(); }</div>
<div> Num& operator+=(Num) { return *this; }</div>
<div> Num& operator-=(Num) { return *this; }</div>
<div> Num& operator*=(Num) { return *this; }</div>
<div> Num& operator/=(Num) { return *this; }</div>
<div> bool operator<(Num) const { return false; }</div>
<div> bool operator>(Num) const { return false; }</div>
<div> };</div>
<div><br class="">
</div>
<div> Num operator/(double, Num) { return Num(); }</div>
<div><br class="">
</div>
<div> double absreal(const Num&) { return 0.0; }</div>
<div>}</div>
<div><br class="">
</div>
<div>namespace Dune</div>
<div>{</div>
<div> namespace fvmeta</div>
<div> {</div>
<div> using Foobar::absreal;</div>
<div> }</div>
<div>}</div>
<div><br class="">
</div>
<div>// #include <dune/common/fmatrix.hh></div>
<div><br class="">
</div>
<div>int main()</div>
<div>{</div>
<div> typedef Dune::FieldMatrix<Foobar::Num, 2, 2> Matrix;</div>
<div> typedef Dune::FieldVector<Foobar::Num, 2> Vector;</div>
<div><br class="">
</div>
<div> Matrix M;</div>
<div> Vector x, y;</div>
<div> M.solve(x, y);</div>
<div> return 0;</div>
<div>}</div>
<div class="">=================================</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
</div>
<div class="" style="word-wrap:break-word">
<div>
<div class=""></div>
</div>
</div>
</body>
</html>