Guys, while compiling this class:
I'm getting following log:
template<class T, int Min, int Max>
class Range
{
const T min_ = Min;
T max_ = Max;
};
Build started on: 06-06-2012 at 16:56.21
Build ended on: 06-06-2012 at 16:56.24
-------------- Build: Debug in SafeInt (compiler: gcc 4.7 STL)---------------
g++.exe -Wall -fexceptions -g -std=c++0x -IC:\SFML-1.6\include -c "C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp" -o obj\Debug\main.o
In file included from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\Range_implementation.hpp:4:0,
from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\Range.hpp:3,
from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\SafeInt_interface.hpp:3,
from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\SafeInt_implementation.hpp:3,
from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\SafeInt.hpp:4,
from C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp:3:
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\Range_interface.hpp: In instantiation of 'class Range<char, -128ll, -127ll>':
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp:10:27: required from here
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\Range_interface.hpp:23:20: warning: non-static const member 'const char Range<char, -128ll, -127ll>::min_' in class without a constructor [-Wuninitialized]
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp: In function 'int main()':
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp:14:15: warning: overflow in implicit constant conversion [-Woverflow]
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp:8:22: warning: unused variable 'min' [-Wunused-variable]
C:\Users\Art\Documents\code blocks\SafeInt\SafeInt\main.cpp:9:22: warning: unused variable 'max' [-Wunused-variable]
g++.exe -LC:\SFML-1.6\lib -o bin\Debug\SafeInt.exe obj\Debug\main.o C:\SFML-1.6\lib\libsfml-audio.a C:\SFML-1.6\lib\libsfml-audio-d.a C:\SFML-1.6\lib\libsfml-audio-s.a C:\SFML-1.6\lib\libsfml-audio-s-d.a C:\SFML-1.6\lib\libsfml-graphics.a C:\SFML-1.6\lib\libsfml-graphics-d.a C:\SFML-1.6\lib\libsfml-graphics-s.a C:\SFML-1.6\lib\libsfml-graphics-s-d.a C:\SFML-1.6\lib\libsfml-main.a C:\SFML-1.6\lib\libsfml-main-d.a C:\SFML-1.6\lib\libsfml-network.a C:\SFML-1.6\lib\libsfml-network-d.a C:\SFML-1.6\lib\libsfml-network-s.a C:\SFML-1.6\lib\libsfml-network-s-d.a C:\SFML-1.6\lib\libsfml-system.a C:\SFML-1.6\lib\libsfml-system-d.a C:\SFML-1.6\lib\libsfml-system-s.a C:\SFML-1.6\lib\libsfml-system-s-d.a C:\SFML-1.6\lib\libsfml-window.a C:\SFML-1.6\lib\libsfml-window-d.a C:\SFML-1.6\lib\libsfml-window-s.a C:\SFML-1.6\lib\libsfml-window-s-d.a
Output size is 1.31 MB
Process terminated with status 0 (0 minutes, 2 seconds)
1 errors, 4 warnings (0 minutes, 2 seconds)
As you see here one error is listed but this error isn't shown in a log. Any thoughts?