core, test: Use type trait functions from std header
This commit is contained in:
committed by
Eduardo Almeida
parent
03f04681f5
commit
61e310c965
@@ -117,7 +117,7 @@ inline Ptr<const AttributeAccessor> MakeAccessorHelper(T1 a1, T2 a2);
|
||||
* Implementation of the templates declared above.
|
||||
***************************************************************/
|
||||
|
||||
#include "type-traits.h"
|
||||
#include <type_traits>
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
@@ -133,7 +133,7 @@ template <typename T>
|
||||
struct AccessorTrait
|
||||
{
|
||||
/** The non-const, non reference type. */
|
||||
typedef typename TypeTraits<typename TypeTraits<T>::ReferencedType>::NonConstType Result;
|
||||
using Result = std::remove_cvref_t<T>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
// Ipv6L3Protocol, Ipv6PacketProbe
|
||||
#include "ns3/lr-wpan-mac.h" // LrWpanMac
|
||||
#include "ns3/lte-module.h" // PhyReceptionStatParameters,
|
||||
@@ -282,7 +283,7 @@ class TracedCallbackTypedefTestCase::Checker : public Object
|
||||
~Checker() override{};
|
||||
|
||||
/// Arguments of the TracedCallback.
|
||||
std::tuple<typename TypeTraits<Ts>::BaseType...> m_items;
|
||||
std::tuple<std::remove_pointer_t<std::remove_cvref_t<Ts>>...> m_items;
|
||||
|
||||
/// Number of arguments of the TracedCallback.
|
||||
const std::size_t m_nItems = sizeof...(Ts);
|
||||
|
||||
Reference in New Issue
Block a user