We're updating the issue view to help you get more done. 

Remove public static vars from generated code

Description

Remove public static vars from generated code. That causes link error sometimes:

1 2 3>orderadaptor.lib(lmax_or_traits.obj) : error LNK2005: "public: static unsigned short const FIX8::LMAX_OR_FIX44::TradeCaptureReportRequest::NoDates::_fnum" (?_fnum@NoDates@TradeCaptureReportRequest@LMAX_OR_FIX44@FIX8@@2GB) already defined in orderadaptor.lib(lmax_fix8orderadaptor.obj) 3>orderadaptor.lib(lmax_or_traits.obj) : error LNK2005: "public: static unsigned short const FIX8::LMAX_OR_FIX44::TradeCaptureReport::NoSides::_fnum" (?_fnum@NoSides@TradeCaptureReport@LMAX_OR_FIX44@FIX8@@2GB) already defined in orderadaptor.lib(lmax_fix8orderadaptor.obj)

The code

1 static const unsigned short _fnum = 580;

can be replaced by

1 enum XXX { _fnum = 580; };

or

1 inline static const unsigned short _fnum() { return 580; }

Environment

Win8.1 x64 vs2013

Status

Assignee

Sergey Sedreev

Reporter

Sergey Sedreev

Labels

None

Branch

None

Products

None

Fix versions

Affects versions

1.0.0

Priority

Major