SCT4SP / cest

Towards a constexpr version of the C++ standard library
GNU General Public License v3.0
18 stars 2 forks source link

Test C'est on a recent version of MSVC #14

Closed pkeir closed 2 years ago

pkeir commented 2 years ago

C'est fails comprehensively to compile with the latest version of Visual Studio 2022. Here are a few notes for future work:

ios_base.hpp

__INT_MAX__ is undefined

basic_ios.hpp

(Function parameter) names starting with __ are rejected: constexpr void exceptions(iostate __except)

No __throw_ios_failure in std (also, __N is undefined): std::__throw_ios_failure(__N("basic_ios::clear"))

streambuf.hpp

Use of __attribute__ syntax is unsupported; e.g.:

#define _IsUnused __attribute__((__unused__))

ostream.hpp

The GCC pragma is undefined, e.g.:

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

...and:

error C2039: 'uncaught_exception': is not a member of 'std'. (Note the return type was changed from bool to int in C++20.

undeclared identifier: __cxxabiv1

Perhaps augment C'est's #if !defined(_LIBCPP_VERSION) with:

#if !defined(_LIBCPP_VERSION) && !define(MSVC_STL_VERSION)  // or whatever MSVC_STL_VERSION actually is