aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-01-17 21:15:24 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-01-17 21:15:24 +0100
commit3fc48e6146e020b86a0ef87749cc645f9b4fa113 (patch)
tree810b23b6de2e775eca03eafd81ff659a8a0319a0 /include
parent6d2af0904652baba69ec81261c914e9b68221dac (diff)
downloadPROJ-3fc48e6146e020b86a0ef87749cc645f9b4fa113.tar.gz
PROJ-3fc48e6146e020b86a0ef87749cc645f9b4fa113.zip
Remove wrong use of PROJ_CONST_DECL and replace it with PROJ_PURE_DECL (fixes #1224)
Diffstat (limited to 'include')
-rw-r--r--include/proj/common.hpp34
-rw-r--r--include/proj/coordinateoperation.hpp34
-rw-r--r--include/proj/coordinatesystem.hpp16
-rw-r--r--include/proj/crs.hpp42
-rw-r--r--include/proj/datum.hpp22
-rw-r--r--include/proj/io.hpp2
-rw-r--r--include/proj/metadata.hpp42
-rw-r--r--include/proj/util.hpp26
8 files changed, 101 insertions, 117 deletions
diff --git a/include/proj/common.hpp b/include/proj/common.hpp
index 29d2c774..6a4d479e 100644
--- a/include/proj/common.hpp
+++ b/include/proj/common.hpp
@@ -149,14 +149,14 @@ class Measure : public util::BaseObject {
PROJ_DLL ~Measure();
//! @endcond
- PROJ_DLL const UnitOfMeasure &unit() PROJ_CONST_DECL;
- PROJ_DLL double getSIValue() PROJ_CONST_DECL;
- PROJ_DLL double value() PROJ_CONST_DECL;
+ PROJ_DLL const UnitOfMeasure &unit() PROJ_PURE_DECL;
+ PROJ_DLL double getSIValue() PROJ_PURE_DECL;
+ PROJ_DLL double value() PROJ_PURE_DECL;
PROJ_DLL double
- convertToUnit(const UnitOfMeasure &otherUnit) PROJ_CONST_DECL;
+ convertToUnit(const UnitOfMeasure &otherUnit) PROJ_PURE_DECL;
- PROJ_DLL bool operator==(const Measure &other) PROJ_CONST_DECL;
+ PROJ_DLL bool operator==(const Measure &other) PROJ_PURE_DECL;
/** Default maximum resulative error. */
static constexpr double DEFAULT_MAX_REL_ERROR = 1e-10;
@@ -296,20 +296,20 @@ class PROJ_GCC_DLL IdentifiedObject : public util::BaseObject,
PROJ_DLL static const std::string DEPRECATED_KEY;
// in practice only name().description() is used
- PROJ_DLL const metadata::IdentifierNNPtr &name() PROJ_CONST_DECL;
- PROJ_DLL const std::string &nameStr() PROJ_CONST_DECL;
+ PROJ_DLL const metadata::IdentifierNNPtr &name() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &nameStr() PROJ_PURE_DECL;
PROJ_DLL const std::vector<metadata::IdentifierNNPtr> &
- identifiers() PROJ_CONST_DECL;
+ identifiers() PROJ_PURE_DECL;
PROJ_DLL const std::vector<util::GenericNameNNPtr> &
- aliases() PROJ_CONST_DECL;
- PROJ_DLL const std::string &remarks() PROJ_CONST_DECL;
+ aliases() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &remarks() PROJ_PURE_DECL;
// from Apache SIS AbstractIdentifiedObject
- PROJ_DLL bool isDeprecated() PROJ_CONST_DECL;
+ PROJ_DLL bool isDeprecated() PROJ_PURE_DECL;
// Non-standard
- PROJ_DLL std::string alias() PROJ_CONST_DECL;
- PROJ_DLL int getEPSGCode() PROJ_CONST_DECL;
+ PROJ_DLL std::string alias() PROJ_PURE_DECL;
+ PROJ_DLL int getEPSGCode() PROJ_PURE_DECL;
PROJ_PRIVATE :
//! @cond Doxygen_Suppress
@@ -325,7 +325,7 @@ class PROJ_GCC_DLL IdentifiedObject : public util::BaseObject,
PROJ_INTERNAL bool
_isEquivalentTo(const IdentifiedObject *other,
util::IComparable::Criterion criterion =
- util::IComparable::Criterion::STRICT) PROJ_CONST_DECL;
+ util::IComparable::Criterion::STRICT) PROJ_PURE_DECL;
//! @endcond
protected:
@@ -363,8 +363,8 @@ class ObjectDomain : public util::BaseObject, public util::IComparable {
// In ISO_19111:2018, scope and domain are compulsory, but in WKT2:2015,
// they
// are not necessarily both specified
- PROJ_DLL const util::optional<std::string> &scope() PROJ_CONST_DECL;
- PROJ_DLL const metadata::ExtentPtr &domainOfValidity() PROJ_CONST_DECL;
+ PROJ_DLL const util::optional<std::string> &scope() PROJ_PURE_DECL;
+ PROJ_DLL const metadata::ExtentPtr &domainOfValidity() PROJ_PURE_DECL;
PROJ_DLL static ObjectDomainNNPtr
create(const util::optional<std::string> &scopeIn,
@@ -414,7 +414,7 @@ class ObjectUsage : public IdentifiedObject {
PROJ_DLL ~ObjectUsage() override;
//! @endcond
- PROJ_DLL const std::vector<ObjectDomainNNPtr> &domains() PROJ_CONST_DECL;
+ PROJ_DLL const std::vector<ObjectDomainNNPtr> &domains() PROJ_PURE_DECL;
PROJ_DLL static const std::string SCOPE_KEY;
PROJ_DLL static const std::string DOMAIN_OF_VALIDITY_KEY;
diff --git a/include/proj/coordinateoperation.hpp b/include/proj/coordinateoperation.hpp
index 80e04577..6b32e24d 100644
--- a/include/proj/coordinateoperation.hpp
+++ b/include/proj/coordinateoperation.hpp
@@ -241,7 +241,7 @@ class PROJ_GCC_DLL OperationParameter final : public GeneralOperationParameter {
PROJ_DLL static OperationParameterNNPtr
create(const util::PropertyMap &properties);
- PROJ_DLL int getEPSGCode() PROJ_CONST_DECL;
+ PROJ_DLL int getEPSGCode() PROJ_PURE_DECL;
PROJ_DLL static const char *getNameForEPSGCode(int epsg_code) noexcept;
@@ -358,12 +358,12 @@ class PROJ_GCC_DLL ParameterValue final : public util::BaseObject,
PROJ_DLL static ParameterValueNNPtr
createFilename(const std::string &stringValueIn);
- PROJ_DLL const Type &type() PROJ_CONST_DECL;
- PROJ_DLL const common::Measure &value() PROJ_CONST_DECL;
- PROJ_DLL const std::string &stringValue() PROJ_CONST_DECL;
- PROJ_DLL const std::string &valueFile() PROJ_CONST_DECL;
- PROJ_DLL int integerValue() PROJ_CONST_DECL;
- PROJ_DLL bool booleanValue() PROJ_CONST_DECL;
+ PROJ_DLL const Type &type() PROJ_PURE_DECL;
+ PROJ_DLL const common::Measure &value() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &stringValue() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &valueFile() PROJ_PURE_DECL;
+ PROJ_DLL int integerValue() PROJ_PURE_DECL;
+ PROJ_DLL bool booleanValue() PROJ_PURE_DECL;
//! @cond Doxygen_Suppress
PROJ_INTERNAL bool
@@ -406,8 +406,8 @@ class PROJ_GCC_DLL OperationParameterValue final
PROJ_DLL ~OperationParameterValue() override;
//! @endcond
- PROJ_DLL const OperationParameterNNPtr &parameter() PROJ_CONST_DECL;
- PROJ_DLL const ParameterValueNNPtr &parameterValue() PROJ_CONST_DECL;
+ PROJ_DLL const OperationParameterNNPtr &parameter() PROJ_PURE_DECL;
+ PROJ_DLL const ParameterValueNNPtr &parameterValue() PROJ_PURE_DECL;
PROJ_DLL static OperationParameterValueNNPtr
create(const OperationParameterNNPtr &parameterIn,
@@ -468,11 +468,11 @@ class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject {
PROJ_DLL ~OperationMethod() override;
//! @endcond
- PROJ_DLL const util::optional<std::string> &formula() PROJ_CONST_DECL;
+ PROJ_DLL const util::optional<std::string> &formula() PROJ_PURE_DECL;
PROJ_DLL const util::optional<metadata::Citation> &
- formulaCitation() PROJ_CONST_DECL;
+ formulaCitation() PROJ_PURE_DECL;
PROJ_DLL const std::vector<GeneralOperationParameterNNPtr> &
- parameters() PROJ_CONST_DECL;
+ parameters() PROJ_PURE_DECL;
PROJ_DLL static OperationMethodNNPtr
create(const util::PropertyMap &properties,
@@ -482,7 +482,7 @@ class PROJ_GCC_DLL OperationMethod : public common::IdentifiedObject {
create(const util::PropertyMap &properties,
const std::vector<OperationParameterNNPtr> &parameters);
- PROJ_DLL int getEPSGCode() PROJ_CONST_DECL;
+ PROJ_DLL int getEPSGCode() PROJ_PURE_DECL;
//! @cond Doxygen_Suppress
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
@@ -540,8 +540,8 @@ class PROJ_GCC_DLL SingleOperation : virtual public CoordinateOperation {
//! @endcond
PROJ_DLL const std::vector<GeneralParameterValueNNPtr> &
- parameterValues() PROJ_CONST_DECL;
- PROJ_DLL const OperationMethodNNPtr &method() PROJ_CONST_DECL;
+ parameterValues() PROJ_PURE_DECL;
+ PROJ_DLL const OperationMethodNNPtr &method() PROJ_PURE_DECL;
PROJ_DLL const ParameterValuePtr &
parameterValue(const std::string &paramName, int epsg_code = 0) const
@@ -1358,8 +1358,8 @@ class PROJ_GCC_DLL Transformation : public SingleOperation {
PROJ_DLL ~Transformation() override;
//! @endcond
- PROJ_DLL const crs::CRSNNPtr &sourceCRS() PROJ_CONST_DECL;
- PROJ_DLL const crs::CRSNNPtr &targetCRS() PROJ_CONST_DECL;
+ PROJ_DLL const crs::CRSNNPtr &sourceCRS() PROJ_PURE_DECL;
+ PROJ_DLL const crs::CRSNNPtr &targetCRS() PROJ_PURE_DECL;
PROJ_DLL CoordinateOperationNNPtr inverse() const override;
diff --git a/include/proj/coordinatesystem.hpp b/include/proj/coordinatesystem.hpp
index 1a8f61cd..9216bf33 100644
--- a/include/proj/coordinatesystem.hpp
+++ b/include/proj/coordinatesystem.hpp
@@ -129,7 +129,7 @@ class PROJ_GCC_DLL Meridian : public common::IdentifiedObject {
PROJ_DLL ~Meridian() override;
//! @endcond
- PROJ_DLL const common::Angle &longitude() PROJ_CONST_DECL;
+ PROJ_DLL const common::Angle &longitude() PROJ_PURE_DECL;
// non-standard
PROJ_DLL static MeridianNNPtr create(const common::Angle &longitudeIn);
@@ -172,12 +172,12 @@ class PROJ_GCC_DLL CoordinateSystemAxis final
PROJ_DLL ~CoordinateSystemAxis() override;
//! @endcond
- PROJ_DLL const std::string &abbreviation() PROJ_CONST_DECL;
- PROJ_DLL const AxisDirection &direction() PROJ_CONST_DECL;
- PROJ_DLL const common::UnitOfMeasure &unit() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<double> &minimumValue() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<double> &maximumValue() PROJ_CONST_DECL;
- PROJ_DLL const MeridianPtr &meridian() PROJ_CONST_DECL;
+ PROJ_DLL const std::string &abbreviation() PROJ_PURE_DECL;
+ PROJ_DLL const AxisDirection &direction() PROJ_PURE_DECL;
+ PROJ_DLL const common::UnitOfMeasure &unit() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<double> &minimumValue() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<double> &maximumValue() PROJ_PURE_DECL;
+ PROJ_DLL const MeridianPtr &meridian() PROJ_PURE_DECL;
// Non-standard
PROJ_DLL static CoordinateSystemAxisNNPtr
@@ -242,7 +242,7 @@ class PROJ_GCC_DLL CoordinateSystem : public common::IdentifiedObject {
//! @endcond
PROJ_DLL const std::vector<CoordinateSystemAxisNNPtr> &
- axisList() PROJ_CONST_DECL;
+ axisList() PROJ_PURE_DECL;
PROJ_PRIVATE :
diff --git a/include/proj/crs.hpp b/include/proj/crs.hpp
index 65414d7d..1c012666 100644
--- a/include/proj/crs.hpp
+++ b/include/proj/crs.hpp
@@ -97,7 +97,7 @@ class PROJ_GCC_DLL CRS : public common::ObjectUsage {
bool allowIntermediateCRS) const;
PROJ_DLL CRSNNPtr stripVerticalComponent() const;
- PROJ_DLL const BoundCRSPtr &canonicalBoundCRS() PROJ_CONST_DECL;
+ PROJ_DLL const BoundCRSPtr &canonicalBoundCRS() PROJ_PURE_DECL;
PROJ_DLL std::list<std::pair<CRSNNPtr, int>>
identify(const io::AuthorityFactoryPtr &authorityFactory) const;
@@ -156,10 +156,10 @@ class PROJ_GCC_DLL SingleCRS : public CRS {
PROJ_DLL ~SingleCRS() override;
//! @endcond
- PROJ_DLL const datum::DatumPtr &datum() PROJ_CONST_DECL;
- PROJ_DLL const datum::DatumEnsemblePtr &datumEnsemble() PROJ_CONST_DECL;
+ PROJ_DLL const datum::DatumPtr &datum() PROJ_PURE_DECL;
+ PROJ_DLL const datum::DatumEnsemblePtr &datumEnsemble() PROJ_PURE_DECL;
PROJ_DLL const cs::CoordinateSystemNNPtr &
- coordinateSystem() PROJ_CONST_DECL;
+ coordinateSystem() PROJ_PURE_DECL;
PROJ_PRIVATE :
//! @cond Doxygen_Suppress
@@ -213,20 +213,20 @@ class PROJ_GCC_DLL GeodeticCRS : virtual public SingleCRS,
PROJ_DLL ~GeodeticCRS() override;
//! @endcond
- PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_CONST_DECL;
+ PROJ_DLL const datum::GeodeticReferenceFramePtr &datum() PROJ_PURE_DECL;
- PROJ_DLL const datum::PrimeMeridianNNPtr &primeMeridian() PROJ_CONST_DECL;
- PROJ_DLL const datum::EllipsoidNNPtr &ellipsoid() PROJ_CONST_DECL;
+ PROJ_DLL const datum::PrimeMeridianNNPtr &primeMeridian() PROJ_PURE_DECL;
+ PROJ_DLL const datum::EllipsoidNNPtr &ellipsoid() PROJ_PURE_DECL;
// coordinateSystem() returns either a EllipsoidalCS, SphericalCS or
// CartesianCS
PROJ_DLL const std::vector<operation::PointMotionOperationNNPtr> &
- velocityModel() PROJ_CONST_DECL;
+ velocityModel() PROJ_PURE_DECL;
// Non-standard
- PROJ_DLL bool isGeocentric() PROJ_CONST_DECL;
+ PROJ_DLL bool isGeocentric() PROJ_PURE_DECL;
PROJ_DLL static GeodeticCRSNNPtr
create(const util::PropertyMap &properties,
@@ -320,7 +320,7 @@ class PROJ_GCC_DLL GeographicCRS : public GeodeticCRS {
PROJ_DLL ~GeographicCRS() override;
//! @endcond
- PROJ_DLL const cs::EllipsoidalCSNNPtr &coordinateSystem() PROJ_CONST_DECL;
+ PROJ_DLL const cs::EllipsoidalCSNNPtr &coordinateSystem() PROJ_PURE_DECL;
// Non-standard
PROJ_DLL static GeographicCRSNNPtr
@@ -350,7 +350,7 @@ class PROJ_GCC_DLL GeographicCRS : public GeodeticCRS {
const override; // throw(FormattingException)
PROJ_DLL bool
- is2DPartOf3D(util::nn<const GeographicCRS *> other) PROJ_CONST_DECL;
+ is2DPartOf3D(util::nn<const GeographicCRS *> other) PROJ_PURE_DECL;
PROJ_INTERNAL bool
_isEquivalentTo(const util::IComparable *other,
@@ -410,9 +410,9 @@ class PROJ_GCC_DLL VerticalCRS : virtual public SingleCRS,
PROJ_DLL const datum::VerticalReferenceFramePtr datum() const;
PROJ_DLL const cs::VerticalCSNNPtr coordinateSystem() const;
PROJ_DLL const std::vector<operation::TransformationNNPtr> &
- geoidModel() PROJ_CONST_DECL;
+ geoidModel() PROJ_PURE_DECL;
PROJ_DLL const std::vector<operation::PointMotionOperationNNPtr> &
- velocityModel() PROJ_CONST_DECL;
+ velocityModel() PROJ_PURE_DECL;
PROJ_DLL static VerticalCRSNNPtr
create(const util::PropertyMap &properties,
@@ -484,13 +484,13 @@ class PROJ_GCC_DLL DerivedCRS : virtual public SingleCRS {
PROJ_DLL ~DerivedCRS() override;
//! @endcond
- PROJ_DLL const SingleCRSNNPtr &baseCRS() PROJ_CONST_DECL;
+ PROJ_DLL const SingleCRSNNPtr &baseCRS() PROJ_PURE_DECL;
PROJ_DLL const operation::ConversionNNPtr derivingConversion() const;
PROJ_PRIVATE :
//! @cond Doxygen_Suppress
PROJ_INTERNAL const operation::ConversionNNPtr &
- derivingConversionRef() PROJ_CONST_DECL;
+ derivingConversionRef() PROJ_PURE_DECL;
//! @endcond
protected:
@@ -548,8 +548,8 @@ class PROJ_GCC_DLL ProjectedCRS final : public DerivedCRS,
PROJ_DLL ~ProjectedCRS() override;
//! @endcond
- PROJ_DLL const GeodeticCRSNNPtr &baseCRS() PROJ_CONST_DECL;
- PROJ_DLL const cs::CartesianCSNNPtr &coordinateSystem() PROJ_CONST_DECL;
+ PROJ_DLL const GeodeticCRSNNPtr &baseCRS() PROJ_PURE_DECL;
+ PROJ_DLL const cs::CartesianCSNNPtr &coordinateSystem() PROJ_PURE_DECL;
PROJ_DLL static ProjectedCRSNNPtr
create(const util::PropertyMap &properties,
@@ -795,7 +795,7 @@ class PROJ_GCC_DLL CompoundCRS final : public CRS,
//! @endcond
PROJ_DLL const std::vector<CRSNNPtr> &
- componentReferenceSystems() PROJ_CONST_DECL;
+ componentReferenceSystems() PROJ_PURE_DECL;
PROJ_DLL std::list<std::pair<CompoundCRSNNPtr, int>>
identify(const io::AuthorityFactoryPtr &authorityFactory) const;
@@ -868,12 +868,12 @@ class PROJ_GCC_DLL BoundCRS final : public CRS,
PROJ_DLL ~BoundCRS() override;
//! @endcond
- PROJ_DLL const CRSNNPtr &baseCRS() PROJ_CONST_DECL;
+ PROJ_DLL const CRSNNPtr &baseCRS() PROJ_PURE_DECL;
PROJ_DLL CRSNNPtr baseCRSWithCanonicalBoundCRS() const;
- PROJ_DLL const CRSNNPtr &hubCRS() PROJ_CONST_DECL;
+ PROJ_DLL const CRSNNPtr &hubCRS() PROJ_PURE_DECL;
PROJ_DLL const operation::TransformationNNPtr &
- transformation() PROJ_CONST_DECL;
+ transformation() PROJ_PURE_DECL;
//! @cond Doxygen_Suppress
PROJ_INTERNAL void _exportToWKT(io::WKTFormatter *formatter)
diff --git a/include/proj/datum.hpp b/include/proj/datum.hpp
index 6e60c47c..17c4c2c1 100644
--- a/include/proj/datum.hpp
+++ b/include/proj/datum.hpp
@@ -177,7 +177,7 @@ class PROJ_GCC_DLL PrimeMeridian final : public common::IdentifiedObject,
PROJ_DLL ~PrimeMeridian() override;
//! @endcond
- PROJ_DLL const common::Angle &longitude() PROJ_CONST_DECL;
+ PROJ_DLL const common::Angle &longitude() PROJ_PURE_DECL;
// non-standard
PROJ_DLL static PrimeMeridianNNPtr
@@ -249,25 +249,25 @@ class PROJ_GCC_DLL Ellipsoid final : public common::IdentifiedObject,
PROJ_DLL ~Ellipsoid() override;
//! @endcond
- PROJ_DLL const common::Length &semiMajorAxis() PROJ_CONST_DECL;
+ PROJ_DLL const common::Length &semiMajorAxis() PROJ_PURE_DECL;
// Inlined from SecondDefiningParameter union
PROJ_DLL const util::optional<common::Scale> &
- inverseFlattening() PROJ_CONST_DECL;
+ inverseFlattening() PROJ_PURE_DECL;
PROJ_DLL const util::optional<common::Length> &
- semiMinorAxis() PROJ_CONST_DECL;
- PROJ_DLL bool isSphere() PROJ_CONST_DECL;
+ semiMinorAxis() PROJ_PURE_DECL;
+ PROJ_DLL bool isSphere() PROJ_PURE_DECL;
PROJ_DLL const util::optional<common::Length> &
- semiMedianAxis() PROJ_CONST_DECL;
+ semiMedianAxis() PROJ_PURE_DECL;
// non-standard
- PROJ_DLL double computedInverseFlattening() PROJ_CONST_DECL;
- PROJ_DLL double squaredEccentricity() PROJ_CONST_DECL;
+ PROJ_DLL double computedInverseFlattening() PROJ_PURE_DECL;
+ PROJ_DLL double squaredEccentricity() PROJ_PURE_DECL;
PROJ_DLL common::Length computeSemiMinorAxis() const;
- PROJ_DLL const std::string &celestialBody() PROJ_CONST_DECL;
+ PROJ_DLL const std::string &celestialBody() PROJ_PURE_DECL;
PROJ_DLL static const std::string EARTH;
@@ -377,11 +377,11 @@ class PROJ_GCC_DLL GeodeticReferenceFrame : public Datum {
PROJ_DLL ~GeodeticReferenceFrame() override;
//! @endcond
- PROJ_DLL const PrimeMeridianNNPtr &primeMeridian() PROJ_CONST_DECL;
+ PROJ_DLL const PrimeMeridianNNPtr &primeMeridian() PROJ_PURE_DECL;
// We constraint more than the standard into which the ellipsoid might
// be omitted for a CRS with a non-ellipsoidal CS
- PROJ_DLL const EllipsoidNNPtr &ellipsoid() PROJ_CONST_DECL;
+ PROJ_DLL const EllipsoidNNPtr &ellipsoid() PROJ_PURE_DECL;
// non-standard
PROJ_DLL static GeodeticReferenceFrameNNPtr
diff --git a/include/proj/io.hpp b/include/proj/io.hpp
index 7f7639cd..ac951233 100644
--- a/include/proj/io.hpp
+++ b/include/proj/io.hpp
@@ -822,7 +822,7 @@ class PROJ_GCC_DLL AuthorityFactory {
const std::string &sourceCRSCode,
const std::string &targetCRSCode) const;
- PROJ_DLL const std::string &getAuthority() PROJ_CONST_DECL;
+ PROJ_DLL const std::string &getAuthority() PROJ_PURE_DECL;
/** Object type. */
enum class ObjectType {
diff --git a/include/proj/metadata.hpp b/include/proj/metadata.hpp
index d1b91515..02873c81 100644
--- a/include/proj/metadata.hpp
+++ b/include/proj/metadata.hpp
@@ -71,7 +71,7 @@ class PROJ_GCC_DLL Citation : public util::BaseObject {
PROJ_DLL ~Citation();
//! @endcond
- PROJ_DLL const util::optional<std::string> &title() PROJ_CONST_DECL;
+ PROJ_DLL const util::optional<std::string> &title() PROJ_PURE_DECL;
protected:
PROJ_FRIEND_OPTIONAL(Citation);
@@ -154,10 +154,10 @@ class PROJ_GCC_DLL GeographicBoundingBox : public GeographicExtent {
PROJ_DLL ~GeographicBoundingBox() override;
//! @endcond
- PROJ_DLL double westBoundLongitude() PROJ_CONST_DECL;
- PROJ_DLL double southBoundLatitude() PROJ_CONST_DECL;
- PROJ_DLL double eastBoundLongitude() PROJ_CONST_DECL;
- PROJ_DLL double northBoundLatitude() PROJ_CONST_DECL;
+ PROJ_DLL double westBoundLongitude() PROJ_PURE_DECL;
+ PROJ_DLL double southBoundLatitude() PROJ_PURE_DECL;
+ PROJ_DLL double eastBoundLongitude() PROJ_PURE_DECL;
+ PROJ_DLL double northBoundLatitude() PROJ_PURE_DECL;
PROJ_DLL static GeographicBoundingBoxNNPtr
create(double west, double south, double east, double north);
@@ -208,8 +208,8 @@ class PROJ_GCC_DLL TemporalExtent : public util::BaseObject,
PROJ_DLL ~TemporalExtent() override;
//! @endcond
- PROJ_DLL const std::string &start() PROJ_CONST_DECL;
- PROJ_DLL const std::string &stop() PROJ_CONST_DECL;
+ PROJ_DLL const std::string &start() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &stop() PROJ_PURE_DECL;
PROJ_DLL static TemporalExtentNNPtr create(const std::string &start,
const std::string &stop);
@@ -255,9 +255,9 @@ class PROJ_GCC_DLL VerticalExtent : public util::BaseObject,
PROJ_DLL ~VerticalExtent() override;
//! @endcond
- PROJ_DLL double minimumValue() PROJ_CONST_DECL;
- PROJ_DLL double maximumValue() PROJ_CONST_DECL;
- PROJ_DLL common::UnitOfMeasureNNPtr &unit() PROJ_CONST_DECL;
+ PROJ_DLL double minimumValue() PROJ_PURE_DECL;
+ PROJ_DLL double maximumValue() PROJ_PURE_DECL;
+ PROJ_DLL common::UnitOfMeasureNNPtr &unit() PROJ_PURE_DECL;
PROJ_DLL static VerticalExtentNNPtr
create(double minimumValue, double maximumValue,
@@ -304,13 +304,13 @@ class PROJ_GCC_DLL Extent : public util::BaseObject, public util::IComparable {
PROJ_DLL ~Extent() override;
//! @endcond
- PROJ_DLL const util::optional<std::string> &description() PROJ_CONST_DECL;
+ PROJ_DLL const util::optional<std::string> &description() PROJ_PURE_DECL;
PROJ_DLL const std::vector<GeographicExtentNNPtr> &
- geographicElements() PROJ_CONST_DECL;
+ geographicElements() PROJ_PURE_DECL;
PROJ_DLL const std::vector<TemporalExtentNNPtr> &
- temporalElements() PROJ_CONST_DECL;
+ temporalElements() PROJ_PURE_DECL;
PROJ_DLL const std::vector<VerticalExtentNNPtr> &
- verticalElements() PROJ_CONST_DECL;
+ verticalElements() PROJ_PURE_DECL;
PROJ_DLL static ExtentNNPtr
create(const util::optional<std::string> &descriptionIn,
@@ -383,12 +383,12 @@ class PROJ_GCC_DLL Identifier : public util::BaseObject,
PROJ_DLL static const std::string EPSG;
PROJ_DLL static const std::string OGC;
- PROJ_DLL const util::optional<Citation> &authority() PROJ_CONST_DECL;
- PROJ_DLL const std::string &code() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<std::string> &codeSpace() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<std::string> &version() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<std::string> &description() PROJ_CONST_DECL;
- PROJ_DLL const util::optional<std::string> &uri() PROJ_CONST_DECL;
+ PROJ_DLL const util::optional<Citation> &authority() PROJ_PURE_DECL;
+ PROJ_DLL const std::string &code() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<std::string> &codeSpace() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<std::string> &version() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<std::string> &description() PROJ_PURE_DECL;
+ PROJ_DLL const util::optional<std::string> &uri() PROJ_PURE_DECL;
PROJ_DLL static bool isEquivalentName(const char *a,
const char *b) noexcept;
@@ -441,7 +441,7 @@ class PROJ_GCC_DLL PositionalAccuracy : public util::BaseObject {
PROJ_DLL ~PositionalAccuracy() override;
//! @endcond
- PROJ_DLL const std::string &value() PROJ_CONST_DECL;
+ PROJ_DLL const std::string &value() PROJ_PURE_DECL;
PROJ_DLL static PositionalAccuracyNNPtr create(const std::string &valueIn);
diff --git a/include/proj/util.hpp b/include/proj/util.hpp
index c40595f2..30985ec8 100644
--- a/include/proj/util.hpp
+++ b/include/proj/util.hpp
@@ -153,30 +153,14 @@ namespace proj {}
#if defined(__GNUC__)
#define PROJ_NO_INLINE __attribute__((noinline))
#define PROJ_NO_RETURN __attribute__((noreturn))
-// Applies to a function that has no side effect, and its return will not
-// change if the arguments are the same. But is return may change
-// if the object state changes. So this is for getters of mutable objects.
+// Applies to a function that has no side effect.
#define PROJ_PURE_DECL const noexcept __attribute__((pure))
-// Applies to a function that has no side effect, and its return will not
-// change if the arguments are the same, and their pointed value must not
-// be modified. So this is for getters of immutable objets. This is stronger
-// than PROJ_PURE_DECL.
-#if defined(__INTEL_COMPILER)
-// If using __attribute__((const)), ICC on an expression like
-// Angle(x).getSIValue() will create the object, destroy it and then call
-// getSIValue(). Fallback to ((pure)), which is weaker
-#define PROJ_CONST_DECL const noexcept __attribute__((pure))
-#else
-#define PROJ_CONST_DECL const noexcept __attribute__((const))
-#endif
#else
#define PROJ_NO_RETURN
#define PROJ_NO_INLINE
#define PROJ_PURE_DECL const noexcept
-#define PROJ_CONST_DECL const noexcept
#endif
#define PROJ_PURE_DEFN const noexcept
-#define PROJ_CONST_DEFN const noexcept
//! @endcond
@@ -673,16 +657,16 @@ class CodeList {
/** Return the CodeList item as a string. */
// cppcheck-suppress functionStatic
- inline const std::string &toString() PROJ_CONST_DECL { return name_; }
+ inline const std::string &toString() PROJ_PURE_DECL { return name_; }
/** Return the CodeList item as a string. */
- inline operator std::string() PROJ_CONST_DECL { return toString(); }
+ inline operator std::string() PROJ_PURE_DECL { return toString(); }
//! @cond Doxygen_Suppress
- inline bool operator==(const CodeList &other) PROJ_CONST_DECL {
+ inline bool operator==(const CodeList &other) PROJ_PURE_DECL {
return name_ == other.name_;
}
- inline bool operator!=(const CodeList &other) PROJ_CONST_DECL {
+ inline bool operator!=(const CodeList &other) PROJ_PURE_DECL {
return name_ != other.name_;
}
//! @endcond