mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 20:24:26 +01:00
Don't include heavy STL headers like <algorithm> in header files
This provides a considerable compilation time reduction and most of these were just using std::copy/fill which can be replaced by memcpy/memset, as all of their uses were applied to POD types
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include "macros.h"
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h>
|
||||
@@ -38,14 +37,17 @@
|
||||
#include <ws2tcpip.h>
|
||||
#include <mstcpip.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include "ipv6_address.h"
|
||||
#include "address_range.h"
|
||||
#include "exceptions.h"
|
||||
|
||||
using std::fill;
|
||||
using std::string;
|
||||
using std::ostream;
|
||||
|
||||
namespace Tins {
|
||||
|
||||
@@ -132,6 +134,10 @@ bool IPv6Address::is_multicast() const {
|
||||
return multicast_range.contains(*this);
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream& os, const IPv6Address& addr) {
|
||||
return os << addr.to_string();
|
||||
}
|
||||
|
||||
IPv6Address operator&(const IPv6Address& lhs, const IPv6Address& rhs) {
|
||||
IPv6Address output = lhs;
|
||||
IPv6Address::iterator addr_iter = output.begin();
|
||||
|
||||
Reference in New Issue
Block a user