[Dune] Warnings about FieldVector::size

Jö Fahlke jorrit at jorrit.de
Tue Aug 16 16:06:52 CEST 2011


Am Tue, 16. Aug 2011, 15:20:16 +0200 schrieb Markus Blatt:
> since Oliver's changes one gets a warning like "The FieldVector class
> exports is size by the enum member 'size'..." whenever fieldvector.hh
> is included, which is too often!
> 
> IMHO this is rather annoying as I cannot use this warning to find
> calls to ::size in the code. Isn't there another way of warning people
> about the change?

Deprecating member enumberators does not appear to work in any compiler
version I've tried.  It is however possible to deprecate member constants
(except for clang++ which issues no warning but compiled cleanly).  See the
documentation for DUNE_DEPRECATED [1].  Turning the enum into a member
constant (i.e.

  static const std::size_t size = ...;

instead of

  enum { size = ... };

) shouln't lead to any problems.

[1] http://www.dune-project.org/doc/doxygen/dune-common-html/group___common.html#gb56b68b6f47fe5b4f2bbd28d2227ca4a

Bye,
Jö.

-- 
Computers are like air conditioners.  Both stop working, if you open
windows.
-- Adam Heath
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110816/75c18279/attachment.sig>


More information about the Dune mailing list