PMPやってたらコンパイラ間の挙動の違いに飲み込まれて死んだ。大体msvcが悪い。(自由律)
この記事はC++アドベントカレンダー4日目の記事です。
昨日はコンパイル中にコンパイルする「コンパイル時Cコンパイラ」をつくった話でした。
先日VS2017RCが出ました。VC++のコア言語とライブラリに関して新機能をチェックしていこうという記事です。全部は無理ですが。
以下プロパティの言語標準を「ISO C++ 標準の最終草案 (/std:c++latest)」にしていることを前提とします。
| #include"xpeaming.hpp" | |
| #include<iostream> | |
| using namespace xpeaming; | |
| struct ab_t | |
| { | |
| }; | |
| struct bc_t | |
| { |
| // Copyright plasma-effect 2017. | |
| // Distributed under the Boost Software License, Version 1.0. | |
| // See http://www.boost.org/LICENSE_1_0.txt | |
| #pragma once | |
| #include<vector> | |
| #include<optional> | |
| #include<tuple> | |
| #include<utility> | |
| #include<map> | |
| #include<array> |
| // Copyright plasma-effect 2017. | |
| // Distributed under the Boost Software License, Version 1.0. | |
| // (See at http://www.boost.org/LICENSE_1_0.txt) | |
| #pragma once | |
| #include<vector> | |
| #include<optional> | |
| #include<variant> | |
| #include<memory> | |
| #include<string> |
| //#define _DEBUG | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Numerics; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace RecursiveFunction | |
| { |
| #pragma once | |
| #include<optional> | |
| #include<variant> | |
| #include<tuple> | |
| #include<string_view> | |
| #include<functional> | |
| #include<array> | |
| #include<set> | |
| namespace single_parse |
| #include<Siv3D.hpp> | |
| #include<algorithm> | |
| typedef std::pair<double, double> point; | |
| typedef point size; | |
| double& x(point& p) | |
| { | |
| return p.first; | |
| } | |
| double& y(point& p) |
PMPやってたらコンパイラ間の挙動の違いに飲み込まれて死んだ。大体msvcが悪い。(自由律)
この記事はC++アドベントカレンダー4日目の記事です。
昨日はコンパイル中にコンパイルする「コンパイル時Cコンパイラ」をつくった話でした。
先日VS2017RCが出ました。VC++のコア言語とライブラリに関して新機能をチェックしていこうという記事です。全部は無理ですが。
以下プロパティの言語標準を「ISO C++ 標準の最終草案 (/std:c++latest)」にしていることを前提とします。
plasma.ADTにlight_adt.hppを追加した。使い方は以下の通り。
#include<iostream>
#include<string>
#include"light_adt.hpp"
using namespace plasma_adt;
struct list :data_type<list, int, tuple<int, list>>
{
templatelist(T&& arg) :data_type(std::forward(arg))| #include<iostream> | |
| #include<type_traits> | |
| #include<utility> | |
| #include<functional> | |
| namespace eratosthenes | |
| { | |
| template<std::size_t I, class Sequence>struct add; | |
| template<std::size_t I, std::size_t... Is>struct add<I, std::index_sequence<Is...>> | |
| { |
| #pragma once | |
| #ifndef PLASMA_REGEXPR_ | |
| #define PLASMA_REGEXPR_ | |
| #include<string> | |
| #include<array> | |
| #include<vector> | |
| #include<memory> | |
| #include<typeindex> | |
| #include<boost/utility/string_view.hpp> |