waf-tools: remove FRIEND_TYPENAME check
It becomes unnecessary after dropping Ubuntu 12.04 build support.
refs #3599
Change-Id: I2b2ed8b38b8b7f5ec28dc32cb81bd04adfad4f88
diff --git a/.waf-tools/compiler-features.py b/.waf-tools/compiler-features.py
index 39516e6..502596c 100644
--- a/.waf-tools/compiler-features.py
+++ b/.waf-tools/compiler-features.py
@@ -2,47 +2,6 @@
from waflib.Configure import conf
-FRIEND_TYPENAME = '''
-class A;
-
-template<typename T>
-class B
-{
- friend T;
-};
-
-B<A> g_b;
-'''
-
-FRIEND_WRAPPER = '''
-class A;
-
-template<typename T>
-struct TypeWrapper
-{
- typedef T Type;
-};
-
-template<typename T>
-class B
-{
- friend class TypeWrapper<T>::Type;
-};
-
-B<A> g_b;
-'''
-
-@conf
-def check_friend_typename(self):
- if self.check_cxx(msg='Checking for friend typename-specifier',
- fragment=FRIEND_TYPENAME,
- features='cxx', mandatory=False):
- self.define('HAVE_CXX_FRIEND_TYPENAME', 1)
- elif self.check_cxx(msg='Checking for friend typename using wrapper',
- fragment=FRIEND_WRAPPER,
- features='cxx', mandatory=True):
- self.define('HAVE_CXX_FRIEND_TYPENAME_WRAPPER', 1)
-
STD_TO_STRING = '''
#include <string>
int
@@ -90,6 +49,5 @@
self.define('HAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR', 1)
def configure(conf):
- conf.check_friend_typename()
conf.check_std_to_string()
conf.check_vector_const_iterators()
diff --git a/src/util/signal-signal.hpp b/src/util/signal-signal.hpp
index ca6dcf1..7756eae 100644
--- a/src/util/signal-signal.hpp
+++ b/src/util/signal-signal.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -95,18 +95,7 @@
operator()(const TArgs&...args, const DummyExtraArg&);
// make Owner a friend of Signal<Owner, ...> so that API for owner can be called
-#if NDN_CXX_HAVE_CXX_FRIEND_TYPENAME
friend Owner;
-#elif NDN_CXX_HAVE_CXX_FRIEND_TYPENAME_WRAPPER
- template<typename T>
- struct TypeWrapper
- {
- typedef T Type;
- }; // http://stackoverflow.com/a/5608542/3729203
- friend class TypeWrapper<Owner>::Type;
-#else
-# error "cannot declare Owner as friend"
-#endif
private: // internal implementation
typedef Signal<Owner, TArgs...> Self;