Click here to Skip to main content
15,887,776 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Netbeans C++ Sqlite3 Pin
sashoalm16-Feb-10 5:06
sashoalm16-Feb-10 5:06 
GeneralRe: Netbeans C++ Sqlite3 Pin
Richard MacCutchan16-Feb-10 8:10
mveRichard MacCutchan16-Feb-10 8:10 
AnswerRe: Netbeans C++ Sqlite3 Pin
CPallini16-Feb-10 11:15
mveCPallini16-Feb-10 11:15 
GeneralRe: Netbeans C++ Sqlite3 Pin
xivShin16-Feb-10 18:44
xivShin16-Feb-10 18:44 
GeneralRe: Netbeans C++ Sqlite3 Pin
CPallini16-Feb-10 20:53
mveCPallini16-Feb-10 20:53 
QuestionStatic Const Initialization Pin
Skippums16-Feb-10 3:17
Skippums16-Feb-10 3:17 
AnswerRe: Static Const Initialization Pin
«_Superman_»16-Feb-10 3:32
professional«_Superman_»16-Feb-10 3:32 
GeneralRe: Static Const Initialization Pin
Skippums16-Feb-10 3:36
Skippums16-Feb-10 3:36 
Yes, I saw that post in my quest for a solution, but I can't figure out how to go about initializing the members based on template specialization. Any ideas?

Oh, I also get the compiler error C2057 when I move all of the non-specialized declarations within the structure definition. In other words, I attempted the following:
// Template structures used to get information about IEEE floating-point formats
template<size_t bytes> struct __float {
public:
    // Mantissa size, in bits
    static const __uint8  MantissaSize;
    // Significand size, in bits
    static const __uint8  SignificandSize = MantissaSize + 1;
    // Exponent size, in bits
    static const __uint8  ExponentSize    = (bytes << 3) - SignificandSize;
    // The maximum representable exponent (reserved for inf and NaN)
    static const __uint16 ExponentMax = (1 << ExponentSize) - 1;
    // The exponent bias
    static const __uint16 ExponentBias = ExponentMax >> 1;
    // An integer with only the bit left of the mantissa set
    static const __int64 SignificandBit = 1LL << MantissaSize;
    // An integer with all bits included in the mantissa set
    static const __int64 MantissaMask = SignificandBit - 1;
    static const __int64 SignificandMask = SignificandBit | MantissaMask;
    // An integer with all bits included in the exponent set
    static const __int64 ExponentMask = static_cast<__int64>(ExponentMax) << MantissaSize;
};
    
// Defines the constants used by the __float structure
template<> const __uint8 __float< 2>::MantissaSize =  10;
template<> const __uint8 __float< 4>::MantissaSize =  23;
template<> const __uint8 __float< 8>::MantissaSize =  52;
This resulted in a number of C2057 errors about expecting a constant expression. I must be misinterpreting your recommendation, because I can't figure out how to make such a thing compile. Thanks for any additional help,
Sounds like somebody's got a case of the Mondays

-Jeff
modified on Tuesday, February 16, 2010 9:45 AM

AnswerRe: Static Const Initialization Pin
Skippums16-Feb-10 4:37
Skippums16-Feb-10 4:37 
QuestionMFC Dragging Image Pin
RS.Ratheesh16-Feb-10 0:04
RS.Ratheesh16-Feb-10 0:04 
QuestionCom With multiple reference conflict Pin
Ash_VCPP15-Feb-10 23:32
Ash_VCPP15-Feb-10 23:32 
QuestionRe: Com With multiple reference conflict Pin
CPallini16-Feb-10 0:07
mveCPallini16-Feb-10 0:07 
AnswerRe: Com With multiple reference conflict Pin
Ash_VCPP16-Feb-10 1:05
Ash_VCPP16-Feb-10 1:05 
QuestionRe: Com With multiple reference conflict Pin
CPallini16-Feb-10 1:19
mveCPallini16-Feb-10 1:19 
AnswerRe: Com With multiple reference conflict Pin
Ash_VCPP16-Feb-10 1:37
Ash_VCPP16-Feb-10 1:37 
GeneralRe: Com With multiple reference conflict Pin
CPallini16-Feb-10 20:55
mveCPallini16-Feb-10 20:55 
QuestionChanging exe icon at runtime Pin
learningvisualc15-Feb-10 23:01
learningvisualc15-Feb-10 23:01 
AnswerRe: Changing exe icon at runtime Pin
Code-o-mat15-Feb-10 23:22
Code-o-mat15-Feb-10 23:22 
AnswerRe: Changing exe icon at runtime Pin
Saurabh.Garg16-Feb-10 1:01
Saurabh.Garg16-Feb-10 1:01 
QuestionInsert data of more than 4000 characters in clob datatype Pin
MsmVc15-Feb-10 21:06
MsmVc15-Feb-10 21:06 
QuestionRe: Insert data of more than 4000 characters in clob datatype Pin
David Crow16-Feb-10 3:57
David Crow16-Feb-10 3:57 
AnswerRe: Insert data of more than 4000 characters in clob datatype Pin
MsmVc16-Feb-10 19:26
MsmVc16-Feb-10 19:26 
GeneralRe: Insert data of more than 4000 characters in clob datatype Pin
David Crow17-Feb-10 3:06
David Crow17-Feb-10 3:06 
QuestionApplication Theme changes automatically Pin
Harsh Shankar15-Feb-10 20:27
Harsh Shankar15-Feb-10 20:27 
AnswerRe: Application Theme changes automatically Pin
Eugen Podsypalnikov16-Feb-10 6:41
Eugen Podsypalnikov16-Feb-10 6:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.