forked from boostorg/concept_check
add defaulted parameter for function_requires() to work around problems
with Compaq C++ and MSVC [SVN r13040]
This commit is contained in:
@@ -19,6 +19,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <boost/type_traits/conversion_traits.hpp>
|
#include <boost/type_traits/conversion_traits.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
#include <boost/type.hpp>
|
||||||
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
|
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
|
||||||
#define BOOST_FPTR
|
#define BOOST_FPTR
|
||||||
@@ -36,8 +38,9 @@ namespace boost {
|
|||||||
|
|
||||||
template <class T> inline void ignore_unused_variable_warning(const T&) { }
|
template <class T> inline void ignore_unused_variable_warning(const T&) { }
|
||||||
|
|
||||||
|
// the unused, defaulted parameter is a workaround for MSVC and Compaq C++
|
||||||
template <class Concept>
|
template <class Concept>
|
||||||
inline void function_requires()
|
inline void function_requires(type<Concept>* = 0)
|
||||||
{
|
{
|
||||||
#if !defined(NDEBUG)
|
#if !defined(NDEBUG)
|
||||||
void (Concept::*x)() = BOOST_FPTR Concept::constraints;
|
void (Concept::*x)() = BOOST_FPTR Concept::constraints;
|
||||||
|
Reference in New Issue
Block a user