build+nsync+tests+docs: Fix compilation for boost 1.59, doxygen docs, and other fixes
Requires ndn-cxx:commit:e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba (ndn-cxx-0.4.0-beta2-11-ge3e2505)
or earlier commit.
Change-Id: I6ad359aa368b3346464f2aa74a1ab319fcd3ab7a
diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
index 2af7d6a..1e0fdd7 100755
--- a/.jenkins.d/10-ndn-cxx.sh
+++ b/.jenkins.d/10-ndn-cxx.sh
@@ -2,30 +2,34 @@
set -x
set -e
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
pushd /tmp >/dev/null
-INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE)
+NDN_CXX_FOLDER=ndn-cxx-0.4.0-beta2-11-ge3e2505
-sudo rm -Rf ndn-cxx-latest
-git clone --depth 1 git://github.com/named-data/ndn-cxx ndn-cxx-latest
-LATEST_VERSION=$((cd ndn-cxx-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN)
-
-if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
- sudo rm -Rf ndn-cxx
- mv ndn-cxx-latest ndn-cxx
-else
- sudo rm -Rf ndn-cxx-latest
-fi
+sudo rm -Rf "$NDN_CXX_FOLDER"
sudo rm -Rf /usr/local/include/ndn-cxx
sudo rm -f /usr/local/lib/libndn-cxx*
sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
-pushd ndn-cxx >/dev/null
+mkdir "$NDN_CXX_FOLDER"
+pushd "$NDN_CXX_FOLDER" > /dev/null
-./waf configure -j1 --color=yes --without-osx-keychain
+git init
+git fetch https://github.com/named-data/ndn-cxx master && git checkout e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba
+
+./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain
./waf -j1 --color=yes
sudo ./waf install -j1 --color=yes
popd >/dev/null
popd >/dev/null
+
+if has Linux $NODE_LABELS; then
+ sudo ldconfig
+elif has FreeBSD $NODE_LABELS; then
+ sudo ldconfig -a
+fi
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index e699edb..767cb16 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -1,53 +1,58 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-from waflib import Logs, Configure
+from waflib import Logs, Configure, Utils
def options(opt):
opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug',
help='''Compile in debugging mode without optimizations (-O0 or -Og)''')
def configure(conf):
- areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
- defaultFlags = ['-std=c++0x', '-std=c++11',
- '-stdlib=libc++', # clang on OSX < 10.9 by default uses a non
- # C++11-compatible STL library
- '-Wall', '-Wno-long-long']
+ cxx = conf.env['CXX_NAME'] # CXX_NAME represents generic name of the compiler
+ if cxx == 'gcc':
+ flags = GccFlags()
+ elif cxx == 'clang':
+ flags = ClangFlags()
+ else:
+ flags = CompilerFlags()
+ Logs.warn('The code has not yet been tested with %s compiler' % cxx)
+ areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
+
+ # General flags are always applied (e.g., selecting C++11 mode)
+ generalFlags = flags.getGeneralFlags(conf)
+ conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
+ conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
+ conf.env.DEFINES += generalFlags['DEFINES']
+
+ # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
+ # corresponding environment variables are not set.
+ # DEFINES are always applied.
if conf.options.debug:
- conf.define('_DEBUG', 1)
- defaultFlags += ['-O0',
- '-Og', # gcc >= 4.8
- '-g3',
- '-fcolor-diagnostics', # clang
- '-fdiagnostics-color', # gcc >= 4.9
- '-Werror',
- '-Wno-error=deprecated-register',
- '-Wno-error=maybe-uninitialized', # Bug #1615
- '-Wno-error=unneeded-internal-declaration', # Bug #1588
- '-Wno-nested-anon-types',
- ]
+ extraFlags = flags.getDebugFlags(conf)
if areCustomCxxflagsPresent:
- missingFlags = [x for x in defaultFlags if x not in conf.env.CXXFLAGS]
+ missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
if len(missingFlags) > 0:
Logs.warn("Selected debug mode, but CXXFLAGS is set to a custom value '%s'"
% " ".join(conf.env.CXXFLAGS))
Logs.warn("Default flags '%s' are not activated" % " ".join(missingFlags))
- else:
- conf.add_supported_cxxflags(defaultFlags)
else:
- defaultFlags += ['-O2', '-g']
- if not areCustomCxxflagsPresent:
- conf.add_supported_cxxflags(defaultFlags)
+ extraFlags = flags.getOptimizedFlags(conf)
- # clang on OSX < 10.9 by default uses a non C++11-compatible STL library
- conf.add_supported_linkflags(['-stdlib=libc++'])
+ if not areCustomCxxflagsPresent:
+ conf.add_supported_cxxflags(extraFlags['CXXFLAGS'])
+ conf.add_supported_linkflags(extraFlags['LINKFLAGS'])
+
+ conf.env.DEFINES += extraFlags['DEFINES']
@Configure.conf
def add_supported_cxxflags(self, cxxflags):
"""
Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable
"""
- self.start_msg('Checking allowed compile-stage flags for c++ compiler')
+ if len(cxxflags) == 0:
+ return
+
+ self.start_msg('Checking supported CXXFLAGS')
supportedFlags = []
for flag in cxxflags:
@@ -62,7 +67,10 @@
"""
Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
"""
- self.start_msg('Checking allowed link-stage flags for c++ compiler')
+ if len(linkflags) == 0:
+ return
+
+ self.start_msg('Checking supported LINKFLAGS')
supportedFlags = []
for flag in linkflags:
@@ -71,3 +79,113 @@
self.end_msg(' '.join(supportedFlags))
self.env.LINKFLAGS = supportedFlags + self.env.LINKFLAGS
+
+
+class CompilerFlags(object):
+ def getGeneralFlags(self, conf):
+ """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
+ return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []}
+
+ def getDebugFlags(self, conf):
+ """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in debug mode"""
+ return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['_DEBUG']}
+
+ def getOptimizedFlags(self, conf):
+ """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode"""
+ return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']}
+
+class GccBasicFlags(CompilerFlags):
+ """
+ This class defines basic flags that work for both gcc and clang compilers
+ """
+ def getDebugFlags(self, conf):
+ flags = super(GccBasicFlags, self).getDebugFlags(conf)
+ flags['CXXFLAGS'] += ['-O0',
+ '-g3',
+ '-pedantic',
+ '-Wall',
+ '-Wextra',
+ '-Werror',
+ '-Wno-unused-parameter',
+ '-Wno-error=maybe-uninitialized', # Bug #1615
+ ]
+ return flags
+
+ def getOptimizedFlags(self, conf):
+ flags = super(GccBasicFlags, self).getOptimizedFlags(conf)
+ flags['CXXFLAGS'] += ['-O2',
+ '-g',
+ '-pedantic',
+ '-Wall',
+ '-Wextra',
+ '-Wno-unused-parameter',
+ ]
+ return flags
+
+class GccFlags(GccBasicFlags):
+ def getGeneralFlags(self, conf):
+ flags = super(GccFlags, self).getGeneralFlags(conf)
+ version = tuple(int(i) for i in conf.env['CC_VERSION'])
+ if version < (4, 6, 0):
+ conf.fatal('The version of gcc you are using (%s) is too old.\n' %
+ '.'.join(conf.env['CC_VERSION']) +
+ 'The minimum supported gcc version is 4.6.0.')
+ elif version < (4, 7, 0):
+ flags['CXXFLAGS'] += ['-std=c++0x']
+ else:
+ flags['CXXFLAGS'] += ['-std=c++11']
+ if version < (4, 8, 0):
+ flags['DEFINES'] += ['_GLIBCXX_USE_NANOSLEEP'] # Bug #2499
+ return flags
+
+ def getDebugFlags(self, conf):
+ flags = super(GccFlags, self).getDebugFlags(conf)
+ version = tuple(int(i) for i in conf.env['CC_VERSION'])
+ if version < (5, 1, 0):
+ flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
+ flags['CXXFLAGS'] += ['-Og', # gcc >= 4.8
+ '-fdiagnostics-color', # gcc >= 4.9
+ ]
+ return flags
+
+ def getOptimizedFlags(self, conf):
+ flags = super(GccFlags, self).getOptimizedFlags(conf)
+ version = tuple(int(i) for i in conf.env['CC_VERSION'])
+ if version < (5, 1, 0):
+ flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
+ flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
+ return flags
+
+class ClangFlags(GccBasicFlags):
+ def getGeneralFlags(self, conf):
+ flags = super(ClangFlags, self).getGeneralFlags(conf)
+ flags['CXXFLAGS'] += ['-std=c++11']
+ if Utils.unversioned_sys_platform() == 'darwin':
+ flags['CXXFLAGS'] += ['-stdlib=libc++']
+ flags['LINKFLAGS'] += ['-stdlib=libc++']
+ return flags
+
+ def getDebugFlags(self, conf):
+ flags = super(ClangFlags, self).getDebugFlags(conf)
+ flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+ '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+ '-Wno-error=unneeded-internal-declaration', # Bug #1588
+ '-Wno-error=deprecated-register',
+ '-Wno-error=keyword-macro', # Bug #3235
+ '-Wno-nested-anon-types',
+ '-Wno-sign-compare',
+ '-Wno-keyword-macro',
+ '-Wno-error=ignored-qualifiers',
+ '-Wno-error=infinite-recursion',
+ ]
+ return flags
+
+ def getOptimizedFlags(self, conf):
+ flags = super(ClangFlags, self).getOptimizedFlags(conf)
+ flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+ '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+ '-Wno-nested-anon-types',
+ '-Wno-sign-compare',
+ '-Wno-keyword-macro',
+ ]
+ return flags
diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in
index c8ecebb..c85d71b 100644
--- a/docs/doxygen.conf.in
+++ b/docs/doxygen.conf.in
@@ -1782,18 +1782,6 @@
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
# listings (including syntax highlighting and cross-referencing information) to
# the XML output. Note that enabling this will significantly increase the size
@@ -1928,7 +1916,18 @@
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
-PREDEFINED =
+PREDEFINED = DOXYGEN=1 \
+ INIT_LOGGER(x)= \
+ BOOST_STATIC_ASSERT(x)= \
+ BOOST_CONCEPT_ASSERT(x)= \
+ BOOST_CONCEPT_REQUIRES(x)= \
+ DECL_OVERRIDE=override \
+ PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
+ PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
+ PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
+ VIRTUAL_WITH_TESTS \
+ DECL_CLASS_FINAL=final \
+ DECL_FINAL=final
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
diff --git a/nsync/sync-logging.h b/nsync/sync-logging.h
index 2bdc36b..fce13c2 100644
--- a/nsync/sync-logging.h
+++ b/nsync/sync-logging.h
@@ -28,7 +28,7 @@
#include <log4cxx/logger.h>
#define INIT_LOGGER(name) \
- static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name);
+ static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name)
#define _LOG_DEBUG(x) \
LOG4CXX_DEBUG(staticModuleLogger, x);
diff --git a/nsync/sync-logic.cc b/nsync/sync-logic.cc
index 2e0169c..900c424 100644
--- a/nsync/sync-logic.cc
+++ b/nsync/sync-logic.cc
@@ -29,6 +29,7 @@
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
#include <vector>
using namespace std;
diff --git a/nsync/sync-socket.cc b/nsync/sync-socket.cc
index 9c5ea9f..68eaa7d 100644
--- a/nsync/sync-socket.cc
+++ b/nsync/sync-socket.cc
@@ -20,7 +20,9 @@
#include "sync-socket.h"
#include "sync-logging.h"
+
#include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
using namespace std;
diff --git a/src/tlv/adjacency-lsa.cpp b/src/tlv/adjacency-lsa.cpp
index e346e8a..b654b78 100644
--- a/src/tlv/adjacency-lsa.cpp
+++ b/src/tlv/adjacency-lsa.cpp
@@ -43,9 +43,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-AdjacencyLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+AdjacencyLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
{
size_t totalLength = 0;
@@ -63,10 +63,10 @@
}
template size_t
-AdjacencyLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+AdjacencyLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& encoder) const;
template size_t
-AdjacencyLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+AdjacencyLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& encoder) const;
const ndn::Block&
AdjacencyLsa::wireEncode() const
diff --git a/src/tlv/adjacency-lsa.hpp b/src/tlv/adjacency-lsa.hpp
index 2fe5fc3..141386e 100644
--- a/src/tlv/adjacency-lsa.hpp
+++ b/src/tlv/adjacency-lsa.hpp
@@ -109,9 +109,9 @@
return *this;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/src/tlv/adjacency.cpp b/src/tlv/adjacency.cpp
index 3a24356..05a206b 100644
--- a/src/tlv/adjacency.cpp
+++ b/src/tlv/adjacency.cpp
@@ -43,9 +43,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-Adjacency::wireEncode(ndn::EncodingImpl<T>& encoder) const
+Adjacency::wireEncode(ndn::EncodingImpl<TAG>& encoder) const
{
size_t totalLength = 0;
@@ -63,10 +63,10 @@
}
template size_t
-Adjacency::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+Adjacency::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
template size_t
-Adjacency::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+Adjacency::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
const ndn::Block&
Adjacency::wireEncode() const
diff --git a/src/tlv/adjacency.hpp b/src/tlv/adjacency.hpp
index 517bf42..2ad37b6 100644
--- a/src/tlv/adjacency.hpp
+++ b/src/tlv/adjacency.hpp
@@ -101,9 +101,9 @@
return *this;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/src/tlv/coordinate-lsa.cpp b/src/tlv/coordinate-lsa.cpp
index efbac11..9bcdfd0 100644
--- a/src/tlv/coordinate-lsa.cpp
+++ b/src/tlv/coordinate-lsa.cpp
@@ -44,9 +44,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-CoordinateLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+CoordinateLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
{
size_t totalLength = 0;
size_t doubleLength = 10;
@@ -70,10 +70,10 @@
}
template size_t
-CoordinateLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+CoordinateLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
template size_t
-CoordinateLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+CoordinateLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
const ndn::Block&
CoordinateLsa::wireEncode() const
diff --git a/src/tlv/coordinate-lsa.hpp b/src/tlv/coordinate-lsa.hpp
index c769dfd..11ce6d5 100644
--- a/src/tlv/coordinate-lsa.hpp
+++ b/src/tlv/coordinate-lsa.hpp
@@ -103,9 +103,9 @@
return *this;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/src/tlv/lsa-info.cpp b/src/tlv/lsa-info.cpp
index da3f189..28ddc10 100644
--- a/src/tlv/lsa-info.cpp
+++ b/src/tlv/lsa-info.cpp
@@ -47,9 +47,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-LsaInfo::wireEncode(ndn::EncodingImpl<T>& encoder) const
+LsaInfo::wireEncode(ndn::EncodingImpl<TAG>& encoder) const
{
size_t totalLength = 0;
@@ -73,10 +73,10 @@
}
template size_t
-LsaInfo::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+LsaInfo::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
template size_t
-LsaInfo::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+LsaInfo::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
const ndn::Block&
LsaInfo::wireEncode() const
diff --git a/src/tlv/lsa-info.hpp b/src/tlv/lsa-info.hpp
index 0cb186c..fc7cc91 100644
--- a/src/tlv/lsa-info.hpp
+++ b/src/tlv/lsa-info.hpp
@@ -114,9 +114,9 @@
return m_hasInfiniteExpirationPeriod;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/src/tlv/lsdb-status.cpp b/src/tlv/lsdb-status.cpp
index dae40d3..e621798 100644
--- a/src/tlv/lsdb-status.cpp
+++ b/src/tlv/lsdb-status.cpp
@@ -45,9 +45,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-LsdbStatus::wireEncode(ndn::EncodingImpl<T>& block) const
+LsdbStatus::wireEncode(ndn::EncodingImpl<TAG>& block) const
{
size_t totalLength = 0;
@@ -73,10 +73,10 @@
}
template size_t
-LsdbStatus::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+LsdbStatus::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
template size_t
-LsdbStatus::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+LsdbStatus::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
const ndn::Block&
LsdbStatus::wireEncode() const
diff --git a/src/tlv/lsdb-status.hpp b/src/tlv/lsdb-status.hpp
index cc66d49..cf916b1 100644
--- a/src/tlv/lsdb-status.hpp
+++ b/src/tlv/lsdb-status.hpp
@@ -156,9 +156,9 @@
return m_hasNameLsas;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/src/tlv/name-lsa.cpp b/src/tlv/name-lsa.cpp
index c60b0b4..2542989 100644
--- a/src/tlv/name-lsa.cpp
+++ b/src/tlv/name-lsa.cpp
@@ -43,9 +43,9 @@
wireDecode(block);
}
-template<bool T>
+template<ndn::encoding::Tag TAG>
size_t
-NameLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+NameLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
{
size_t totalLength = 0;
@@ -63,10 +63,10 @@
}
template size_t
-NameLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+NameLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
template size_t
-NameLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+NameLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
const ndn::Block&
NameLsa::wireEncode() const
diff --git a/src/tlv/name-lsa.hpp b/src/tlv/name-lsa.hpp
index 2b58283..8a5337d 100644
--- a/src/tlv/name-lsa.hpp
+++ b/src/tlv/name-lsa.hpp
@@ -108,9 +108,9 @@
return *this;
}
- template<bool T>
+ template<ndn::encoding::Tag TAG>
size_t
- wireEncode(ndn::EncodingImpl<T>& block) const;
+ wireEncode(ndn::EncodingImpl<TAG>& block) const;
const ndn::Block&
wireEncode() const;
diff --git a/tests/identity-fixture.cpp b/tests/identity-fixture.cpp
index 36ab807..3efdf00 100644
--- a/tests/identity-fixture.cpp
+++ b/tests/identity-fixture.cpp
@@ -95,5 +95,8 @@
};
BOOST_GLOBAL_FIXTURE(IdentityFixture)
+#if BOOST_VERSION >= 105900
+;
+#endif // BOOST_VERSION >= 105900
} // namespace nlsr
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index 07da594..2edb668 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -86,7 +86,7 @@
CoordinateLsa lsa(origin, CoordinateLsa::TYPE_STRING, 1, ndn::time::system_clock::now(),
radius, angle);
- return std::move(lsa);
+ return lsa;
}
void
diff --git a/tests/test-conf-parameter.cpp b/tests/test-conf-parameter.cpp
index 18eebdc..f773fd5 100644
--- a/tests/test-conf-parameter.cpp
+++ b/tests/test-conf-parameter.cpp
@@ -75,7 +75,7 @@
BOOST_CHECK_EQUAL(cp1.getRouterPrefix(), "/ATT/memphis/router1");
- BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), (uint32_t)2);
+ BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), 2);
BOOST_CHECK_EQUAL(cp1.getInterestResendTime(), 1000);
diff --git a/tools/nlsrc.cpp b/tools/nlsrc.cpp
index fad8fc3..3d43a62 100644
--- a/tools/nlsrc.cpp
+++ b/tools/nlsrc.cpp
@@ -351,7 +351,7 @@
const ndn::Name& originRouterName = info.getOriginRouter();
const auto& pair =
- m_routers.insert(std::make_pair(originRouterName, std::move(Router())));
+ m_routers.insert(std::make_pair(originRouterName, Router()));
return pair.first->second;
}
@@ -414,4 +414,4 @@
return 2;
}
return 0;
-}
\ No newline at end of file
+}
diff --git a/wscript b/wscript
index 5d33053..c77a3e3 100644
--- a/wscript
+++ b/wscript
@@ -105,7 +105,7 @@
name='nsync-objects',
features='cxx',
source=bld.path.ant_glob(['nsync/**/*.cc', 'nsync/**/*.proto']),
- use='BOOST NDN_CXX OPENSSL',
+ use='BOOST NDN_CXX OPENSSL LOG4CXX',
includes='nsync',
export_includes='nsync',
)