<NME> main.cpp
<BEF> /*
  Copyright © 2015 Jesse 'Jeaye' Wilkerson
  See licensing at:
    http://opensource.org/licenses/BSD-3-Clause

  File: test/src/map/main.cpp
  Author: Jesse 'Jeaye' Wilkerson
*/

#include <jeayeson/jeayeson.hpp>
#include <jest/jest.hpp>

#include "map/ctor.hpp"
#include "map/get.hpp"
#include "map/set.hpp"
#include "map/find.hpp"
#include "map/size.hpp"
#include "map/clear.hpp"
#include "map/delim.hpp"
#include "map/has.hpp"

int main()
{
  //jest::worker const j{};
  //return j();

  /* TODO: Make sure all this shit is tested. */
  json_value vm

<MSG> Remove add in favor of push_back

<DFF> @@ -21,8 +21,8 @@
 
 int main()
 {
-  //jest::worker const j{};
-  //return j();
+  jest::worker const j{};
+  return j();
 
   /* TODO: Make sure all this shit is tested. */
   json_value vm

{'commit': 'diff --git a/include/jeayeson/array.hpp b/include/jeayeson/array.hpp\nindex 33019ef..6b663dc 100644\n--- a/include/jeayeson/array.hpp\n+++ b/include/jeayeson/array.hpp\n@@ -137,9 +137,6 @@ namespace jeayeson\n       void set(index_t const &index, std::nullptr_t)\n       { values_[index] = typename Value::null_t{}; }\n \n-      template <typename T>\n-      void add(T &&t)\n-      { values_.push_back(Value(std::forward<T>(t))); }\n       template <typename T>\n       void push_back(T &&t)\n       { values_.push_back(Value(std::forward<T>(t))); }\ndiff --git a/include/jeayeson/detail/parser.hpp b/include/jeayeson/detail/parser.hpp\nindex 678d398..d8d76f8 100644\n--- a/include/jeayeson/detail/parser.hpp\n+++ b/include/jeayeson/detail/parser.hpp\n@@ -56,7 +56,7 @@ namespace jeayeson\n               {\n                 ++it;\n \n-                state = add(container, name, json_map{});\n+                state = push_back(container, name, json_map{});\n                 it = parse(get_map(container, name, container.size() - 1), it);\n               } break;\n \n@@ -65,7 +65,7 @@ namespace jeayeson\n               {\n                 ++it;\n \n-                state = add(container, name, json_array{});\n+                state = push_back(container, name, json_array{});\n                 it = parse(get_array(container, name, container.size() - 1), it);\n               } break;\n \n@@ -99,7 +99,7 @@ namespace jeayeson\n                     { value += *it; }\n                   }\n \n-                  state = add(container, name, value);\n+                  state = push_back(container, name, value);\n                 }\n                 else /* Parsing a key/name. */\n                 {\n@@ -147,7 +147,7 @@ namespace jeayeson\n                 if(*is_int == \'.\' || *is_int == \'e\' || *is_int == \'E\')\n                 {\n                   char *end{};\n-                  state = add(container, name, std::strtof(&*it, &end));\n+                  state = push_back(container, name, std::strtof(&*it, &end));\n                   std::advance\n                   (\n                     it,\n@@ -155,7 +155,7 @@ namespace jeayeson\n                   );\n                 }\n                 else\n-                { state = add(container, name, std::atoi(&*it)); }\n+                { state = push_back(container, name, std::atoi(&*it)); }\n \n                 /* Progress to the next element. */\n                 while(*it == \'-\' || *it == \'.\' || (*it >= \'0\' && *it <= \'9\'))\n@@ -169,16 +169,16 @@ namespace jeayeson\n               {\n                 if(std::equal(it, it + 3, "null"))\n                 {\n-                  state = add\n+                  state = push_back\n                   (\n                     container, name,\n                     typename Container::value_type{}\n                   );\n                 }\n                 else if(std::equal(it, it + 3, "true"))\n-                { state = add(container, name, true); }\n+                { state = push_back(container, name, true); }\n                 else\n-                { state = add(container, name, false); }\n+                { state = push_back(container, name, false); }\n \n                 /* Progress to the next element. */\n                 while\ndiff --git a/include/jeayeson/detail/parser_util.hpp b/include/jeayeson/detail/parser_util.hpp\nindex b3f859a..10bd860 100644\n--- a/include/jeayeson/detail/parser_util.hpp\n+++ b/include/jeayeson/detail/parser_util.hpp\n@@ -26,7 +26,7 @@ namespace jeayeson\n     enum class state_t{ parse_name, parse_value };\n \n     template <typename Value, typename Parser, typename T>\n-    state_t add\n+    state_t push_back\n     (\n       map<Value, Parser> &m,\n       std::string const &key,\n@@ -38,14 +38,14 @@ namespace jeayeson\n     }\n \n     template <typename Value, typename Parser, typename T>\n-    state_t add\n+    state_t push_back\n     (\n       array<Value, Parser> &arr,\n       std::string const &,\n       T const &t\n     )\n     {\n-      arr.add(t);\n+      arr.push_back(t);\n       return state_t::parse_value;\n     }\n \ndiff --git a/include/jeayeson/map.hpp b/include/jeayeson/map.hpp\nindex 65a19d8..a1831f6 100644\n--- a/include/jeayeson/map.hpp\n+++ b/include/jeayeson/map.hpp\n@@ -144,7 +144,7 @@ namespace jeayeson\n         array_t arr;\n         arr.reserve(values_.size());\n         for(auto const &it : values_)\n-        { arr.add(it.second); }\n+        { arr.push_back(it.second); }\n         return arr;\n       }\n \ndiff --git a/include/jeayeson/value.hpp b/include/jeayeson/value.hpp\nindex ff6a03a..9b4abbd 100644\n--- a/include/jeayeson/value.hpp\n+++ b/include/jeayeson/value.hpp\n@@ -174,19 +174,21 @@ namespace jeayeson\n \n       /* Shortcut add for arrays. */\n       template <typename T>\n-      void add(T const &val)\n-      { as<array_t>().add(val); }\n+      void push_back(T const &val)\n+      { as<array_t>().push_back(val); }\n \n       /* Shortcut add for maps. */\n       template <typename T>\n-      void add(std::string const &key, T const &val)\n+      void push_back(std::string const &key, T const &val)\n       { as<map_t>().set(key, val); }\n \n-      template <typename T>\n+      template\n+      <\n+        typename T,\n+        typename E = std::enable_if_t<detail::is_convertible<T, value>()>\n+      >\n       variant_t& operator =(T const &val)\n       { set(val); return value_; }\n-      variant_t& operator =(cstr_t const val)\n-      { return (value_ = std::string{ val }); }\n \n     private:\n       variant_t value_;\ndiff --git a/test/src/map/main.cpp b/test/src/map/main.cpp\nindex abc118e..4e32b17 100644\n--- a/test/src/map/main.cpp\n+++ b/test/src/map/main.cpp\n@@ -21,8 +21,8 @@\n \n int main()\n {\n-  //jest::worker const j{};\n-  //return j();\n+  jest::worker const j{};\n+  return j();\n \n   /* TODO: Make sure all this shit is tested. */\n   json_value vm\n', 'commit_subject': 'Remove add in favor of push_back', 'repo_name': 'jeaye/jeayeson', 'committer': {'name': 'jeaye', 'email': '1a73af9e7ae00182733b2292511b814be66f065f@jeaye.com', 'time_sec': '1434198798', 'tz_offset': '480', 'date': {'seconds': '1434198798'}}, 'commit_tree': '33344decc8c35f5f4837014cabccefbe7f2a07ca', 'commit_message': 'Remove add in favor of push_back\n', 'language_name': 'Shell', 'license': 'bsd-3-clause', 'hunks': '@@ -21,8 +21,8 @@\n \n int main()\n {\n-  //jest::worker const j{};\n-  //return j();\n+  jest::worker const j{};\n+  return j();\n \n   /* TODO: Make sure all this shit is tested. */\n   json_value vm\n', 'addition_count': 2, 'deletion_count': 2, 'src_file': 'a/test/src/map/main.cpp', 'tgt_file': 'b/test/src/map/main.cpp', 'file_extension': '.cpp', 'before_file': '/*\n  Copyright © 2015 Jesse \'Jeaye\' Wilkerson\n  See licensing at:\n    http://opensource.org/licenses/BSD-3-Clause\n\n  File: test/src/map/main.cpp\n  Author: Jesse \'Jeaye\' Wilkerson\n*/\n\n#include <jeayeson/jeayeson.hpp>\n#include <jest/jest.hpp>\n\n#include "map/ctor.hpp"\n#include "map/get.hpp"\n#include "map/set.hpp"\n#include "map/find.hpp"\n#include "map/size.hpp"\n#include "map/clear.hpp"\n#include "map/delim.hpp"\n#include "map/has.hpp"\n\nint main()\n{\n  //jest::worker const j{};\n  //return j();\n\n  /* TODO: Make sure all this shit is tested. */\n  json_value vm\n', 'message': 'Remove add in favor of push_back\n', 'author_name': 'jeaye', 'lang': 'cpp'}