diff options
author | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
commit | c49018d9cce52d8c9f34b44865ec3ba8e89a1488 (patch) | |
tree | c5e9e10bc189de0058aa763c47b9920a8351b7df /www/compatibility.html | |
parent | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (diff) | |
download | FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.zip FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.tar.gz |
Vendor import of clang trunk r132879:
http://llvm.org/svn/llvm-project/cfe/trunk@132879
Diffstat (limited to 'www/compatibility.html')
-rw-r--r-- | www/compatibility.html | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/www/compatibility.html b/www/compatibility.html index aa6a39d..b68a766 100644 --- a/www/compatibility.html +++ b/www/compatibility.html @@ -459,13 +459,15 @@ int main() { <p>Clang complains: -<pre> <b>my_file.cpp:2:10: <span class="error">error:</span> use of undeclared identifier 'Multiply'</b> +<pre> <b>my_file.cpp:2:10: <span class="error">error:</span> call to function 'Multiply' that is neither visible in the template definition nor found by argument dependent lookup</b> return Multiply(x, x); <span class="caret"> ^</span> - <b>my_file.cpp:10:3: <span class="note">note:</span> in instantiation of function template specialization 'Squared<int>' requested here</b> Squared(5); <span class="caret"> ^</span> + <b>my_file.cpp:5:5: <span class="note">note:</span> 'Multiply' should be declared prior to the call site</b> + int Multiply(int x, int y) { + <span class="caret"> ^</span> </pre> <p>The C++ standard says that unqualified names like <q>Multiply</q> @@ -516,15 +518,17 @@ void Use() { Dump(ns::Data()); }</pre> -<p>Again, Clang complains about not finding a matching function:</p> +<p>Again, Clang complains:</p> -<pre> -<b>my_file.cpp:5:13: <span class="error">error:</span> invalid operands to binary expression ('ostream' (aka 'basic_ostream<char>') and 'ns::Data const')</b> - std::cout << value << "\n"; - <span class="caret">~~~~~~~~~ ^ ~~~~~</span> -<b>my_file.cpp:17:3: <span class="note">note:</span> in instantiation of function template specialization 'Dump<ns::Data>' requested here</b> - Dump(ns::Data()); - <span class="caret">^</span> +<pre> <b>my_file2.cpp:5:13: <span class="error">error:</span> call to function 'operator<<' that is neither visible in the template definition nor found by argument dependent lookup</b> + std::cout << value << "\n"; + <span class="caret"> ^</span> + <b>my_file2.cpp:17:3: <span class="error">note:</span> in instantiation of function template specialization 'Dump<ns::Data>' requested here</b> + Dump(ns::Data()); + <span class="caret"> ^</span> + <b>my_file2.cpp:12:15: <span class="error">note:</span> 'operator<<' should be declared prior to the call site or in namespace 'ns'</b> + std::ostream& operator<<(std::ostream& out, ns::Data data) { + <span class="caret"> ^</span> </pre> <p>Just like before, unqualified lookup didn't find any declarations |