MSVC2013 workarounds
This commit is contained in:
parent
c059e4d0ef
commit
e4c785beb4
@ -5,9 +5,9 @@ private:
|
|||||||
std::string m_url;
|
std::string m_url;
|
||||||
public:
|
public:
|
||||||
complex_item(const std::string& name, bool current, const std::string& url):
|
complex_item(const std::string& name, bool current, const std::string& url):
|
||||||
m_name{name}, m_current{current}, m_url{url}
|
m_name(name), m_current(current), m_url(url)
|
||||||
{
|
{
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(complex_item::*)()>{
|
||||||
{"name", &complex_item::name}, {"current", &complex_item::current},
|
{"name", &complex_item::name}, {"current", &complex_item::current},
|
||||||
{"url", &complex_item::url}, {"link", &complex_item::link}
|
{"url", &complex_item::url}, {"link", &complex_item::link}
|
||||||
});
|
});
|
||||||
@ -36,14 +36,14 @@ private:
|
|||||||
mstch::array m_item;
|
mstch::array m_item;
|
||||||
public:
|
public:
|
||||||
complex():
|
complex():
|
||||||
m_header{"Colors"},
|
m_header("Colors"),
|
||||||
m_item{
|
m_item(mstch::array{
|
||||||
std::make_shared<complex_item>("red", true, "#Red"),
|
std::make_shared<complex_item>("red", true, "#Red"),
|
||||||
std::make_shared<complex_item>("green", false, "#Green"),
|
std::make_shared<complex_item>("green", false, "#Green"),
|
||||||
std::make_shared<complex_item>("blue", false, "#Blue")
|
std::make_shared<complex_item>("blue", false, "#Blue")
|
||||||
}
|
})
|
||||||
{
|
{
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(complex::*)()>{
|
||||||
{"header", &complex::header}, {"item", &complex::item},
|
{"header", &complex::header}, {"item", &complex::item},
|
||||||
{"list", &complex::list}, {"empty", &complex::empty}
|
{"list", &complex::list}, {"empty", &complex::empty}
|
||||||
});
|
});
|
||||||
|
@ -4,9 +4,9 @@ private:
|
|||||||
mstch::map m_currency;
|
mstch::map m_currency;
|
||||||
public:
|
public:
|
||||||
dot_notation_price():
|
dot_notation_price():
|
||||||
m_value{200}, m_currency{{"symbol", std::string{"$"}}, {"name", std::string{"USD"}}}
|
m_value(200), m_currency(mstch::map{{"symbol", std::string{"$"}}, {"name", std::string{"USD"}}})
|
||||||
{
|
{
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(dot_notation_price::*)()>{
|
||||||
{"value", &dot_notation_price::value},
|
{"value", &dot_notation_price::value},
|
||||||
{"vat", &dot_notation_price::vat},
|
{"vat", &dot_notation_price::vat},
|
||||||
{"currency", &dot_notation_price::currency}});
|
{"currency", &dot_notation_price::currency}});
|
||||||
|
@ -2,8 +2,8 @@ class higher_order_sections: public mstch::object {
|
|||||||
private:
|
private:
|
||||||
std::string m_helper;
|
std::string m_helper;
|
||||||
public:
|
public:
|
||||||
higher_order_sections(): m_helper{"To tinker?"} {
|
higher_order_sections(): m_helper("To tinker?") {
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(higher_order_sections::*)()>{
|
||||||
{"name", &higher_order_sections::name},
|
{"name", &higher_order_sections::name},
|
||||||
{"helper", &higher_order_sections::helper},
|
{"helper", &higher_order_sections::helper},
|
||||||
{"bolder", &higher_order_sections::bolder}
|
{"bolder", &higher_order_sections::bolder}
|
||||||
|
@ -3,8 +3,8 @@ private:
|
|||||||
int m_value;
|
int m_value;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
partial_view(): m_value{10000} {
|
partial_view(): m_value(10000) {
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(partial_view::*)()>{
|
||||||
{"greeting", &partial_view::greeting},
|
{"greeting", &partial_view::greeting},
|
||||||
{"farewell", &partial_view::farewell},
|
{"farewell", &partial_view::farewell},
|
||||||
{"name", &partial_view::name},
|
{"name", &partial_view::name},
|
||||||
|
@ -2,8 +2,8 @@ class partial_whitespace: public mstch::object {
|
|||||||
private:
|
private:
|
||||||
int m_value;
|
int m_value;
|
||||||
public:
|
public:
|
||||||
partial_whitespace(): m_value{10000} {
|
partial_whitespace(): m_value(10000) {
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(partial_whitespace::*)()>{
|
||||||
{"greeting", &partial_whitespace::greeting},
|
{"greeting", &partial_whitespace::greeting},
|
||||||
{"farewell", &partial_whitespace::farewell},
|
{"farewell", &partial_whitespace::farewell},
|
||||||
{"name", &partial_whitespace::name},
|
{"name", &partial_whitespace::name},
|
||||||
|
@ -3,9 +3,9 @@ private:
|
|||||||
int m_value;
|
int m_value;
|
||||||
public:
|
public:
|
||||||
simple():
|
simple():
|
||||||
m_value{10000}
|
m_value(10000)
|
||||||
{
|
{
|
||||||
register_methods(this, {
|
register_methods(this, std::map<std::string,mstch::node(simple::*)()>{
|
||||||
{"name", &simple::name},
|
{"name", &simple::name},
|
||||||
{"value", &simple::value},
|
{"value", &simple::value},
|
||||||
{"taxed_value", &simple::taxed_value},
|
{"taxed_value", &simple::taxed_value},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user