Opened 14 years ago

Closed 14 years ago

#2465 closed Bugs (fixed)

Redefinition error on GCC 4.3.2 using template names as variable names.

Reported by: Dean Michael Berris Owned by: az_sw_dude
Milestone: Boost 1.37.0 Component: date_time
Version: Boost 1.36.0 Severity: Problem
Keywords: Cc:

Description

On GCC 4.3.2 the following code snippet causes an error:

  namespace ns {
    template <class T>
    name { };

    name<int> name; // error here, redefining name
  }

The workaround to this is to use the namespace-qualified type name in the template instantiation:

  ns::name<int> name; // error goes away

Attached is a (trivial) patch that addresses the issue.

Attachments (1)

boost-date_time-tz_db_base.hpp.patch (681 bytes ) - added by Dean Michael Berris 14 years ago.
Patch to tz_db_base.hpp

Download all attachments as: .zip

Change History (3)

by Dean Michael Berris, 14 years ago

Patch to tz_db_base.hpp

comment:1 by smr@…, 14 years ago

This is a duplicate of 1615.

comment:2 by Andrey Semashev, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.