New gcc 4.7 c++ error

Orion Poplawski orion at cora.nwra.com
Mon Jan 30 18:24:00 UTC 2012


I am getting the following error building paraview with gcc 4.7:

In file included from 
/builddir/build/BUILD/ParaView-3.12.0/Qt/Core/pqAnimationScene.cxx:57:0:
/builddir/build/BUILD/ParaView-3.12.0/Qt/Core/pqServerManagerSelectionModel.h:75:30: 
error: calls to overloaded operators cannot appear in a constant-expression

code snippet:

class PQCORE_EXPORT pqServerManagerSelectionModel : public QObject
{
   Q_OBJECT
public:
   /// Supported selections flags. These are a subset of
   /// QItemSelectionModel::SelectionFlags.
   enum SelectionFlag {
     NoUpdate       = QItemSelectionModel::NoUpdate,
     Clear          = QItemSelectionModel::Clear,
     Select         = QItemSelectionModel::Select,
     Deselect       = QItemSelectionModel::Deselect,
     ClearAndSelect = Clear | Select
   };
   Q_DECLARE_FLAGS(SelectionFlags, SelectionFlag)


It's the ClearAndSelect line that generates the error.  Any thoughts or 
suggestions would be appreciated.



-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com


More information about the devel mailing list