4

I'm using C++ Builder XE6, and i'm trying to do some tests with move constructor, to compare the results with copy constructor. Anyway, my compiler forces RVO optimization even though it's checked "Disable all optimizations" in the compiler settings. Is there some additional parameter that needs to be send to compiler?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
Tracer
  • 2,544
  • 2
  • 23
  • 58

1 Answers1

4

You're looking for -fno-elide-constructors.

I don't see this documented anywhere in Embarcadero's docs; however that is the flag that clang uses, and it did have the intended effect when I tried it with bcc64 6.70.

M.M
  • 138,810
  • 21
  • 208
  • 365