<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 4, 2012, at 6:17 AM, Fernando Pelliccioni <<a href="mailto:fpelliccioni@gmail.com">fpelliccioni@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div>Is this compile time error correct?</div><div><br></div><div>g++ 4.6.3 compiles fine</div><div><br></div><div><br></div><div>Here is the code:</div><div><a href="http://pastebin.com/jUQ802Kh" target="_blank">http://pastebin.com/jUQ802Kh</a></div>

</div><div><br></div><div><br></div><div><pre style="width:50em;white-space:pre-wrap">$ clang++ --version
clang version 3.1 (trunk 155038)
Target: i386-pc-linux-gnu
Thread model: posix</pre></div><div><pre style="width:50em;white-space:pre-wrap">$ clang++ -std=c++11 clang_error.cpp 
clang_error.cpp:55:18: error: no matching member function for call to 'get'
        std::cout << ov.get<double>() << std::endl;
                     ~~~^~~~~~~~~~~
clang_error.cpp:43:2: note: candidate template ignored: substitution failure
[with T2 = double]
        get()
        ^
1 error generated.</pre></div></blockquote><br></div><div>As noted in the corresponding bug report (<a href="http://llvm.org/bugs/show_bug.cgi?id=12737">http://llvm.org/bugs/show_bug.cgi?id=12737</a>), Clang is correct to reject this code.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br></div><br></body></html>