Opened 9 years ago

Closed 9 years ago

#8500 closed Bugs (fixed)

Strange syntax error.

Reported by: Neuton de Oliveira Braga Junior <neutonjr@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

In file container/allocator_traits.hpp (lines 213-214) was found:

static void deallocate(Alloc &a, pointer p, size_type n) { return a.deallocate(p, n); }

The static void function has a non-void return.

Are there any reason for this?

Change History (4)

in reply to:  1 comment:2 by anonymous, 9 years ago

Replying to hirad.asadi@…:

Maybe this gives a clue: http://stackoverflow.com/questions/3434803/returning-from-a-void-function-in-c

But still I don't think "return" keyword is needed...

comment:3 by Ion Gaztañaga, 9 years ago

Although legal, it's a trivial change, thanks for the report.

comment:4 by Ion Gaztañaga, 9 years ago

Resolution: fixed
Status: newclosed

(In [84054]) Fixes #8500

Note: See TracTickets for help on using tickets.