This file contains hidden or 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
// demonstration of a bug in VS2022 / MSVC 19.38.32919 | |
// | |
// repro steps: | |
// 1. make a C++17 or later project in VS2022 | |
// 2. add the single-header library "soagen.hpp" to it from here: | |
// https://raw.githubusercontent.com/marzer/soagen/ace22525eeff90d0ff9228b78d0045db87c24099/src/soagen/hpp/single/soagen.hpp | |
// 3. add this code file to it | |
// 4. compile + run | |
// 5. observe that line 53 below (ends with "#### BUG") evaluates to the wrong result | |
// 6. inspect the values in the debugger will show the references are corrupted |
This file contains hidden or 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
// repro of two lambda-related bugs in MSVC 1933.31517 (VS 2022 17.3.0 Pre2) | |
// | |
// required flags: /std:c++17 or /std:c++20 or /std:c++latest (all fail) | |
// | |
// previously worked in whatever the MSVC version was in VS 2022 17.3.0 Pre1 | |
#include <type_traits> | |
#define REPRO_INTERNAL_COMPILER_ERROR 1 | |
#define REPRO_INCORRECT_TRAIT_VALUE 1 |
This file contains hidden or 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 <typename T> | |
struct type_and_nttps | |
{ | |
static constexpr bool value = false; | |
}; | |
template <template <typename> typename T, typename U> | |
struct type_and_nttps<T<U>> | |
{ |
This file contains hidden or 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
// Minimal repro for producing an erroneous C7595 error in Visual Studio 2019 16.10.0 Preview 2 (CL 19.29.30031.0). | |
// | |
// Steps to reproduce: | |
// 1. Compile with /std:c++latest in Visual Studio 2019 16.10.0 Preview 2 (CL 19.29.30031.0) | |
// 2. Observe C7595 at the line marked below | |
// 3. Comment out the 'REPRO' line and rebuild | |
// 4. Observe that plain ol' constexpr works OK | |
using size_t = decltype(sizeof(void*)); |
This file contains hidden or 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
// Repro of intellisense parse errors for VS2019 16.8.5 | |
// | |
// Steps: | |
// 1. Add this file to a VC++ project in VS2019 16.8.5 | |
// 2. Set C++ language level to /std:c++17 or higher | |
// 3. Right-click the code window > Rescan > Rescan File | |
// 4. Right-click the code window > Rescan > Display Browsing Database Errors | |
// 5. Observe that the parser generates 'VCTP001' warnings at the code regions marked below | |
// |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | |
<!-- VC 2015 --> | |
<Type Name="std::_Compressed_pair<*,*,1>"> | |
<DisplayString>{*($T1 *)this}</DisplayString> | |
<Expand> | |
<ExpandedItem>*($T1 *)this</ExpandedItem> | |
</Expand> | |
</Type> |
This file contains hidden or 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
// example of forward-declaring std types. | |
// *** don't use this! it's for exposition only! *** | |
#pragma once | |
#ifdef __has_include | |
#define STDFWD_HAS_INCLUDE(header) __has_include(header) | |
#else | |
#define STDFWD_HAS_INCLUDE(header) 0 | |
#endif |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# dependencies: | |
# pip install --upgrade requests | |
import os.path | |
import sys | |
import re | |
import requests | |
import traceback |
This file contains hidden or 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
#pragma once | |
//-------------------------------------------------------------------- | |
// CONFIGURATION | |
//-------------------------------------------------------------------- | |
#ifdef TOML_CONFIG_HEADER | |
#include TOML_CONFIG_HEADER | |
#endif |
This file contains hidden or 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
//_MSC_VER: 1923 | |
//_MSC_FULL_VER: 192328107 | |
//Toolset: v142 | |
//Visual studio: 2019 16.3.10 | |
//compiler flags: /std:c++latest /permissive- | |
#include <string_view> | |
[[deprecated]] | |
constexpr std::string_view Test(const char* str, size_t len) noexcept |
NewerOlder