diff --git a/Developers_manual/doc_tex/Developers_manual/kl.cpp b/Developers_manual/doc_tex/Developers_manual/kl.cpp deleted file mode 100644 index e7ea8a03804..00000000000 --- a/Developers_manual/doc_tex/Developers_manual/kl.cpp +++ /dev/null @@ -1,21 +0,0 @@ -namespace A { - -class Cls {}; - -bool -foo(const Cls&) -{ return true; } - -} // namespace A - -bool -foo(int) -{ return false; } - -int -main() -{ - A::Cls c; - foo( c ); // Koenig lookup finds A::foo(const Cls&) - return 0; -} diff --git a/Developers_manual/doc_tex/Developers_manual/namespaces.tex b/Developers_manual/doc_tex/Developers_manual/namespaces.tex index 82111b0a767..2a1c6a52ef0 100644 --- a/Developers_manual/doc_tex/Developers_manual/namespaces.tex +++ b/Developers_manual/doc_tex/Developers_manual/namespaces.tex @@ -118,41 +118,6 @@ name and no scope resolution% name lookup, but name lookup for a function call is supposed to search also the namespaces of the argument types for a matching function name. This is sometimes called Koenig-lookup.\ccIndexMainItem{Koenig lookup} -\cgal\ checks for Koenig-lookup. If this is not available, -the flag \ccc{CGAL_CFG_NO_KOENIG_LOOKUP}% -\index{CGAL_CFG_NO_KOENIG_LOOKUP flag@{\tt CGAL\_CFG\_NO\_KOENIG\_LOOKUP} flag} -is set. As a workaround, -you can add matching function(s) with the same name in the using namespace; -most likely, this will be the global scope. -Here is an example: - -\ccIncludeVerbatim{Developers_manual/kl.cpp} - -While \verb+gcc+ doesn't have problems with correctly compiling the program -above, the MipsPro compiler on {\sc IRIX} (up till version 7.30) does not -implement Koenig lookup, so it fails: - -{\small -\begin{verbatim} -bash-2.03$ CC -64 kl.cpp -cc-1387 CC: ERROR File = kl.cpp, Line = 19 - No suitable conversion function from "A::Cls" to "int" exists. - - foo( c ); - ^ - -1 error detected in the compilation of "kl.cpp". -\end{verbatim} - -} -Workaround for missing Koenig lookup:\ccIndexSubitem{Koenig lookup}{workaround} -Define -\begin{verbatim} -bool -foo( const A::Cls& cls) -{ return A::foo( cls); } -\end{verbatim} -in global scope, too. \subsection{Point of instantiation of a template} Name lookup in a template is slightly more complicated. diff --git a/Installation/config/testfiles/CGAL_CFG_NO_KOENIG_LOOKUP.cpp b/Installation/config/testfiles/CGAL_CFG_NO_KOENIG_LOOKUP.cpp deleted file mode 100644 index 41ad675187a..00000000000 --- a/Installation/config/testfiles/CGAL_CFG_NO_KOENIG_LOOKUP.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 1997 Utrecht University (The Netherlands), -// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany), -// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg -// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria), -// and Tel-Aviv University (Israel). All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; version 2.1 of the License. -// See the file LICENSE.LGPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// -// Author(s) : various - -// --------------------------------------------------------------------- -// A short test program to evaluate a C++ compiler. -// This program is used by install_cgal. -// The following documentation will be pasted in the generated configfile. -// --------------------------------------------------------------------- - -//| This flag is set if the compiler doesn't support the operator Koenig -//| lookup. That is, it does not search in the namespace of the arguments for -//| the function. - -namespace A { - struct S {}; - - void foo(const S &) {} -} - -namespace B { -// using A::foo; - - void bar() - { - A::S s; - foo(s); - } - -} - -int main() -{ - B::bar(); - return 0; -} diff --git a/LEDA/test/LEDA/include/CGAL/predicates_on_points_rat_leda_2.h b/LEDA/test/LEDA/include/CGAL/predicates_on_points_rat_leda_2.h index 3a4f14e1833..efa7865c6b6 100644 --- a/LEDA/test/LEDA/include/CGAL/predicates_on_points_rat_leda_2.h +++ b/LEDA/test/LEDA/include/CGAL/predicates_on_points_rat_leda_2.h @@ -47,7 +47,6 @@ orientation(const Point_2& p, */ } -// #ifdef CGAL_CFG_NO_KOENIG_LOOKUP template inline bool @@ -67,7 +66,6 @@ collinear(const Point_2& p, (const use_rat_leda_kernel::Point_2_base&)r); */ } -// #endif // CGAL_CFG_NO_KOENIG_LOOKUP CGAL_END_NAMESPACE