You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.8 KiB
C++

// -*- c++ -*-
#pragma once
#include <xmemory>
#include <stdexcept>
#pragma push_macro("vector") // move ctor
#define vector(...) vector(__VA_ARGS__) noexcept _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector")
#define vector(...) vector(__VA_ARGS__) _Pragma("pop_macro(\"vector\")")
#pragma push_macro("vector") // default ctor
#define vector() vector() noexcept _Pragma("pop_macro(\"vector\")")
#pragma push_macro("emplace_back")
#define emplace_back \
DummyFun(); \
template <typename... Args> \
reference emplace_back(Args&&... args) \
{ \
OriginalEmplaceBack(std::forward<Args>(args)...); \
return back(); \
} \
template <typename... _Valty> \
void OriginalEmplaceBack \
_Pragma("pop_macro(\"emplace_back\")")
#pragma push_macro("emplace_back")
#define emplace_back emplace_back _Pragma("pop_macro(\"emplace_back\")")
#include_next <vector>