This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stddef.h> | |
#include <string_view> | |
#include <pmretvals.h> | |
#include <test_death.hpp> | |
using namespace std; | |
int test_case_operator_dereference_value_initalized_iterator() { | |
string_view::iterator it; // note: for IDL to work correctly, default init and value init are equivalent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Function compile flags: /Ogtpy | |
; COMDAT ?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z | |
_TEXT SEGMENT | |
__Right$ = 8 ; size = 4 | |
?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z PROC ; std::basic_string<char,std::char_traits<char>,std::allocator<char> >::swap, COMDAT | |
; _this$ = ecx | |
; File c:\program files (x86)\microsoft visual studio 14.0\vc\include\xstring | |
; Line 1857 | |
00000 56 push esi | |
00001 57 push edi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vcruntime.h> | |
__std_win32_error __std_fs_equivalent(bool * _Result, const wchar_t *_Path1, const wchar_t *_Path2) noexcept | |
{ // test for equivalent file names | |
const __vcp_unique_handle _Handle1(_FilesysOpenFile(_Path1, FILE_READ_ATTRIBUTES, | |
FILE_FLAG_BACKUP_SEMANTICS)); | |
if (!_Handle1.is_valid()) | |
{ | |
*_Result = false; | |
return (GetLastError()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <functional> | |
#include <string> | |
#include <string_view> | |
#include <benchmark/benchmark.h> | |
#include "file.hpp" | |
#define NOMINMAX | |
#define WIN32_LEAN_AND_MEAN | |
#include <windows.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if _HAS_CXX17 | |
// FUNCTION TEMPLATE clamp | |
template<class _Ty, | |
class _Pr> | |
constexpr const _Ty& clamp(const _Ty& _Val, const _Ty& _Min_val, | |
const _Ty& _Max_val, _Pr _Pred) | |
{ // returns _Val constrained to [_Min_val, _Max_val] ordered by _Pred | |
#if _ITERATOR_DEBUG_LEVEL == 2 | |
return (_DEBUG_LT_PRED(_Pred, _Max_val, _Min_val) | |
? (_DEBUG_ERROR("invalid bounds arguments passed to std::clamp"), _Val) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class T> | |
class StdAllocatorSysMem | |
{ | |
public: | |
typedef T value_type; | |
StdAllocatorSysMem() = default; | |
StdAllocatorSysMem(const StdAllocatorSysMem&) = default; | |
template <class Other> | |
StdAllocatorSysMem(const StdAllocatorSysMem<Other>&) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class _BidIt, | |
class _Diff, | |
class _Ty> inline | |
_BidIt _Buffered_rotate_unchecked(const _BidIt _First, const _BidIt _Mid, const _BidIt _Last, | |
const _Diff _Count1, const _Diff _Count2, _Temporary_buffer<_Ty>& _Temp_buf) | |
{ // rotate [_First, _Last) using temp buffer | |
// precondition: _Count1 == distance(_First, _Mid) | |
// precondition: _Count2 == distance(_Mid, _Last) | |
if (_Count1 == 0) | |
{ // do nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CLASS mutex | |
class mutex | |
{ // class for mutual exclusion | |
public: | |
constexpr mutex() _NOEXCEPT | |
: _Data() | |
{ // construct std::mutex | |
} | |
mutex(const mutex&) = delete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <algorithm> | |
#include <chrono> | |
#include <functional> | |
#include <iterator> | |
#include <random> | |
#include <vector> | |
using namespace std; | |
using namespace std::chrono; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdio.h> | |
#include <algorithm> | |
#include <random> | |
#include <vector> | |
using namespace std; | |
struct kv { | |
unsigned int significant; |
OlderNewer