Opened 12 years ago

Closed 12 years ago

#4555 closed Feature Requests (fixed)

Warning : Non-static reference in class without a constructor

Reported by: er.ci.2020@… Owned by: Neil Groves
Milestone: To Be Determined Component: range
Version: Boost Development Trunk Severity: Problem
Keywords: Concept Cc:

Description

These are annoying warnings :

/usr/local/trunk/boost/range/concepts.hpp|209|warning: non-static reference 'std::vector<int, std::allocator<int> >& boost::SinglePassRangeConcept<std::vector<int, std::allocator<int> > >::m_range' in class without a constructor|

Perhaps adding a constructor to each concept class that contains a reference would solve the problem?

Mac OSX 10.6.4 -- GCC 4.4.1

Attachments (1)

main.cpp (281 bytes ) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (4)

by anonymous, 12 years ago

Attachment: main.cpp added

comment:1 by Neil Groves, 12 years ago

Status: newassigned

comment:2 by Neil Groves, 12 years ago

You are exactly correct in both the problem and the solution. The issue is not with Boost.Range directly but with boost/concept_check.hpp.

I have modified the function and predicate concept classes to eliminate this warning. The change has been committed to the trunk. I shall monitor the trunk regression test results before subsequently merging to the release branch.

comment:3 by Neil Groves, 12 years ago

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