MSVC2013 workarounds

This commit is contained in:
Daniel Sipka 2015-10-01 12:16:35 +02:00
parent c059e4d0ef
commit e4c785beb4
6 changed files with 16 additions and 16 deletions

View File

@ -5,9 +5,9 @@ private:
std::string m_url;
public:
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},
{"url", &complex_item::url}, {"link", &complex_item::link}
});
@ -36,14 +36,14 @@ private:
mstch::array m_item;
public:
complex():
m_header{"Colors"},
m_item{
m_header("Colors"),
m_item(mstch::array{
std::make_shared<complex_item>("red", true, "#Red"),
std::make_shared<complex_item>("green", false, "#Green"),
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},
{"list", &complex::list}, {"empty", &complex::empty}
});

View File

@ -4,9 +4,9 @@ private:
mstch::map m_currency;
public:
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},
{"vat", &dot_notation_price::vat},
{"currency", &dot_notation_price::currency}});

View File

@ -2,8 +2,8 @@ class higher_order_sections: public mstch::object {
private:
std::string m_helper;
public:
higher_order_sections(): m_helper{"To tinker?"} {
register_methods(this, {
higher_order_sections(): m_helper("To tinker?") {
register_methods(this, std::map<std::string,mstch::node(higher_order_sections::*)()>{
{"name", &higher_order_sections::name},
{"helper", &higher_order_sections::helper},
{"bolder", &higher_order_sections::bolder}

View File

@ -3,8 +3,8 @@ private:
int m_value;
public:
partial_view(): m_value{10000} {
register_methods(this, {
partial_view(): m_value(10000) {
register_methods(this, std::map<std::string,mstch::node(partial_view::*)()>{
{"greeting", &partial_view::greeting},
{"farewell", &partial_view::farewell},
{"name", &partial_view::name},

View File

@ -2,8 +2,8 @@ class partial_whitespace: public mstch::object {
private:
int m_value;
public:
partial_whitespace(): m_value{10000} {
register_methods(this, {
partial_whitespace(): m_value(10000) {
register_methods(this, std::map<std::string,mstch::node(partial_whitespace::*)()>{
{"greeting", &partial_whitespace::greeting},
{"farewell", &partial_whitespace::farewell},
{"name", &partial_whitespace::name},

View File

@ -3,9 +3,9 @@ private:
int m_value;
public:
simple():
m_value{10000}
m_value(10000)
{
register_methods(this, {
register_methods(this, std::map<std::string,mstch::node(simple::*)()>{
{"name", &simple::name},
{"value", &simple::value},
{"taxed_value", &simple::taxed_value},