template classes are not imperatively exported

followup a14ad32b676664cef99f4d43f0a54b4d1ee88f52
fixes win build
This commit is contained in:
Denis Rouzaud 2017-05-24 07:22:46 +02:00
parent f1383e240a
commit 8157cf6e44
2 changed files with 7 additions and 3 deletions

View File

@ -410,7 +410,11 @@ while ($line_idx < $line_count){
do {no warnings 'uninitialized';
push @CLASSNAME, $3;
dbg_info("class: ".$CLASSNAME[$#CLASSNAME]);
$EXPORTED[-1]++ if $line =~ m/\b[A-Z]+_EXPORT\b/;
if ($line =~ m/\b[A-Z]+_EXPORT\b/ || $#CLASSNAME != 0 || $lines[$line_idx-2] =~ m/^\s*template</){
# class should be exported except those not at top level or template classes
# if class is not exported, then its methods should be (checked whenever leaving out the class)
$EXPORTED[-1]++;
}
};
$line = "$1 $3";
# Inheritance
@ -490,7 +494,7 @@ while ($line_idx < $line_count){
pop(@global_bracket_nesting_index);
pop(@ACCESS);
die "Class $CLASSNAME[$#CLASSNAME] in $headerfile at line $line_idx should be exported with appropriate [LIB]_EXPORT macro. If this should not be available in python, wrap it in a `#ifndef SIP_RUN` block."
if $EXPORTED[-1] == 0 && $#CLASSNAME == 0;
if $EXPORTED[-1] == 0;
pop @EXPORTED;
}
pop(@CLASSNAME);

View File

@ -180,7 +180,7 @@ class CORE_EXPORT QgsAbstractFeatureIterator
* \note not available in Python bindings (although present in SIP file)
*/
template<typename T>
class CORE_EXPORT QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
class QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
{
public:
QgsAbstractFeatureIteratorFromSource( T *source, bool ownSource, const QgsFeatureRequest &request )