Created
February 18, 2021 07:17
-
-
Save marzer/ccbae650528e2c2c9512e9a8afbcfa23 to your computer and use it in GitHub Desktop.
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 | |
// | |
#include <utility> | |
#include <type_traits> | |
namespace impl | |
{ | |
// VCTP001 | |
template <template <typename...> typename Trait, typename Enabler, typename... Args> | |
struct is_detected_impl_ : std::false_type {}; | |
// VCTP001 | |
template <template <typename...> typename Trait, typename... Args> | |
struct is_detected_impl_<Trait, std::void_t<Trait<Args...>>, Args...> : std::true_type {}; | |
// VCTP001 | |
template <template <typename...> typename Trait, typename... Args> | |
inline constexpr auto is_detected_ = is_detected_impl_<Trait, void, Args...>::value; | |
} | |
// VCTP001 | |
template <template <typename...> typename Trait, typename... Args> | |
inline constexpr auto is_detected = impl::is_detected_<Trait, Args...>; | |
// VCTP001 | |
template <typename T> | |
using unary_predicate = bool(T)noexcept; | |
int main() | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment