Opened 13 years ago

Closed 11 years ago

#646 closed Patches (fixed)

[program_options] static const variable on evc4

Reported by: vividos Owned by: Vladimir Prus
Milestone: Component: None
Version: None Severity: Showstopper
Keywords: Cc:


In Boost.Program_Options, in the file
options_description.hpp the constant
m_default_line_length is used and declared as static.
On evc4 (a vc6 derived compiler) static class constants
must be declared in the .cpp file. The patch fixes this
by simply removing the "static" keyword. The constant
is only used in the class as default ctor parameter.

Change History (2)

comment:1 Changed 12 years ago by vividos

Logged In: YES 

I checked compiling on msvc71 with this patch and noticed
that the patch doesn't work. If the value for
m_default_line_length would go into an enum, it would work
on all compilers. The updated patch fixes this.

comment:2 Changed 11 years ago by Vladimir Prus

Resolution: Nonefixed
Severity: Showstopper
Status: assignedclosed

I have added the definition of that member in .cpp. That should fix the problem.

Note: See TracTickets for help on using tickets.