Opened 22 months ago

#7 new defect

Compilation error on Mac (clang) functional-style cast from 'const flopc::SUBSETREF' to 'flopc::MP_domain'

Reported by: rpgoldman Owned by: awasielak
Priority: critical Milestone:
Component: DEBs Version:
Keywords: Cc:

Description

When trying to build on Mac with clang, I get the following error:

clang++ -DHAVE_CONFIG_H -I. -I. -I/Users/rpg/src/COIN-1.8/Osi/src/Osi -I/Users/rpg/src/COIN-1.8/CoinUtils/src -O3 -pipe -DNDEBUG -Wparentheses -Wreturn-type -Wcast-qual -Wall -Wpointer-arith -Wwrite-strings -Wconversion -Wno-unknown-pragmas -Wno-long-long -DFLOPCPP_BUILD -MT MP_boolean.lo -MD -MP -MF .deps/MP_boolean.Tpo -c MP_boolean.cpp  -fno-common -DPIC -o .libs/MP_boolean.o
In file included from MP_boolean.cpp:12:
./MP_set.hpp:212:9: error: no matching conversion for functional-style cast from 'const flopc::SUBSETREF' to 'flopc::MP_domain'
        return MP_domain(s);
               ^~~~~~~~~~~
./MP_domain.hpp:61:7: note: candidate constructor (the implicit copy constructor) not viable: cannot convert argument of incomplete type 'const flopc::SUBSETREF' to 'const flopc::MP_domain' for 1st argument
class MP_domain : public Handle<MP_domain_base*> {
      ^
./MP_domain.hpp:75:5: note: candidate constructor not viable: cannot convert argument of incomplete type 'const flopc::SUBSETREF' to 'flopc::MP_domain_base *' for 1st argument
    MP_domain(MP_domain_base* r);
    ^
./MP_domain.hpp:70:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    MP_domain();
    ^

clang version info

$ clang++ -v
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Sierra, Mac OS 10.12.5

I'm afraid I'm not enough of a C++ programmer to grok this.

COIN-OR version 1.8 from SVN.

Change History (0)

Note: See TracTickets for help on using tickets.