Opened 10 years ago

Closed 10 years ago

#8177 closed Bugs (fixed)

multiprecision, can convert from cpp_integer to void*

Reported by: Stepan Podoskin <stepik-777@…> Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

MSVC 2010 is able to compile this:

#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;

int main()
{
    cpp_int a, b;
    void* p = a*b;
    return 0;
}

GCC 4.7.2 can not compile this code, but it can compile this:

#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;

int main()
{
    cpp_int a, b, c;
    void (*p)() = a*b;
    return 0;
}

Change History (1)

comment:1 by John Maddock, 10 years ago

Resolution: fixed
Status: newclosed

(In [83162]) Change boolean context conversion operator so it's not convertible to void*. Fixes #8177.

Note: See TracTickets for help on using tickets.