Fix VPATH builds. Ported form svn trunk -r 3454.
3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2008
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
19 // This file contains a modified version of the concept checking
20 // utility from BOOST.
21 // See the appropriate copyright notice below.
23 // (C) Copyright Jeremy Siek 2000.
24 // Distributed under the Boost Software License, Version 1.0. (See
25 // accompanying file LICENSE_1_0.txt or copy at
26 // http://www.boost.org/LICENSE_1_0.txt)
29 // 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
30 // 02 April 2001: Removed limits header altogether. (Jeremy Siek)
31 // 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
34 // See http://www.boost.org/libs/concept_check for documentation.
37 ///\brief Basic utilities for concept checking.
39 ///\todo Are we still using BOOST concept checking utility?
40 ///Is the BOOST copyright notice necessary?
42 #ifndef LEMON_CONCEPT_CHECK_H
43 #define LEMON_CONCEPT_CHECK_H
48 "inline" is used for ignore_unused_variable_warning()
49 and function_requires() to make sure there is no
53 template <class T> inline void ignore_unused_variable_warning(const T&) { }
56 template <class Concept>
57 inline void function_requires()
60 void (Concept::*x)() = & Concept::constraints;
61 ignore_unused_variable_warning(x);
66 template <typename Concept, typename Type>
67 inline void checkConcept() {
69 typedef typename Concept::template Constraints<Type> ConceptCheck;
70 void (ConceptCheck::*x)() = & ConceptCheck::constraints;
71 ignore_unused_variable_warning(x);
77 #endif // LEMON_CONCEPT_CHECK_H