Subject: [Boost-bugs] [Boost C++ Libraries] #3401: has_new_operator fail if several new operators is overrided
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-04 11:45:48
#3401: has_new_operator fail if several new operators is overrided
-------------------------------------------------+--------------------------
Reporter: Runar Undheim <r.undheim@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: type_traits
Version: Boost 1.40.0 | Severity: Problem
Keywords: |
-------------------------------------------------+--------------------------
This code will not compile:
{{{
#include <stdio.h>
#include <tchar.h>
#include <boost/type_traits.hpp>
#include <boost/type_traits/has_new_operator.hpp>
class A {
public:
void* operator new(std::size_t);
void* operator new(std::size_t, void*);
};
int _tmain(int argc, _TCHAR* argv[])
{
boost::has_new_operator<A>();
return 0;
}
}}}
};
int _tmain(int argc, _TCHAR* argv[])
{
boost::has_new_operator<A>();
return 0;
}
The has_new_operator could be updated with a new check_sig3 test. Where
the new(std::size_t, void*) is moved to the new check_sig3. But because of
ticket #3400, the function should also be split into tree different
functions (ex. has_new_operator, has_new_operator_array and
has_new_operator_placement).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3401> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC