Opened 16 years ago

Closed 15 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:

Description

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 by vividos, 16 years ago

Logged In: YES 
user_id=124874

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 by Vladimir Prus, 15 years ago

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.