On windows with VisualStudio 2010 SP1 if i call within any Component
getBounds().getSmallestIntegerContainer()
i get:
1>c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(701): error C2668: 'floor' : ambiguous call to overloaded function
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(136): could be 'double floor(double)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(519): or 'float floor(float)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(567): or 'long double floor(long double)'
1> while trying to match the argument list '(const int)'
1> c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(691) : see reference to function template instantiation 'juce::Rectangle<ValueType> juce::Rectangle<ValueType>::getSmallestIntegerContainerWithType<int>(void) throw() const' being compiled
1> with
1> [
1> ValueType=int
1> ]
1> c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(690) : while compiling class template member function 'juce::Rectangle<ValueType> juce::Rectangle<ValueType>::getSmallestIntegerContainer(void) throw() const'
1> with
1> [
1> ValueType=int
1> ]
1> c:\devel\ctrlr\nightly\juce\modules\juce_graphics\images\juce_image.h(349) : see reference to class template instantiation 'juce::Rectangle<ValueType>' being compiled
1> with
1> [
1> ValueType=int
1> ]
1>c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(702): error C2668: 'floor' : ambiguous call to overloaded function
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(136): could be 'double floor(double)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(519): or 'float floor(float)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(567): or 'long double floor(long double)'
1> while trying to match the argument list '(const int)'
1>c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(703): error C2668: 'ceil' : ambiguous call to overloaded function
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(135): could be 'double ceil(double)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(509): or 'float ceil(float)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(557): or 'long double ceil(long double)'
1> while trying to match the argument list '(const int)'
1>c:\devel\ctrlr\nightly\juce\modules\juce_graphics\geometry\juce_rectangle.h(704): error C2668: 'ceil' : ambiguous call to overloaded function
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(135): could be 'double ceil(double)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(509): or 'float ceil(float)'
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\math.h(557): or 'long double ceil(long double)'
1> while trying to match the argument list '(const int)'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.46
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
A quick (but a dumb) fix seems to be:
getBounds().toFloat().getSmallestIntegerContainer()