Question: I've spent hours on this problem and for the life of me I can't figure it out, I have an Insert MYSQL command that is not executing, I've tried manually running the query on phpMyadmin and it actually does work but for some reason when the site runs the command, nothing is entered into the database. I have

```
$sql = "INSERT INTO beforeActivation (about, 
  firstname, lastname, businessname, typeofpractice, 
  practicespecial, gender, address, city, zip, cellphone, 
  businessphone, email, username, password, date) 
VALUES('$about', 
  '$firstname', '$lastname', '$businessname', '$typeofpractice', 
  '$practicespecial', '$gender', '$address', '$city', '$zip', '$cellphone', 
  '$businessphone', '$email', '$username', '$password', CURDATE())";

mysql_query($sql) or die(mysql_error());
$_SESSION["idForBeforeAct"] = mysql_insert_id();

```

Importantly, the script continues to run it does not 'die' or spit out any type of error it merely announces that the info was entered and continues to the next form. I ran the exact same query on phpmyadmin and it filled the table up with the variable names like $cellphone because they aren't assigned to anything (obviously). But the main point is the insert command is working, no syntax error, if anyone has any advice it would be a huge help thank you!

Answer: 
The problem is not `basic_string`, because `basic_string<char, restOfMess>` is equivalent to `string`.

The problem is the function only provides

```
f(string&, string&) {
//------^

```

but you are calling as

```
 f(string("blah"), path);
// ^^^^^^^^^^^^^^

```

This is a rvalue (temporary object), and a rvalue cannot be bound to a mutable reference. You either need to change the prototype to accept const references or just pass-by-value:

```
    f(const string&, string&) {
//----^^^^^^
or
    f(string, string&) {

```

Or provide a mutable reference (if you really need to modify the 1st argument in that function):

```
string s = "blah blah blah";
f(s, path);

```
The problem here is that the first (okay, well both, but the first is the one causing the problem) parameter to the `configuration_file_error` constructor is a non-`const` reference, and you can't bind a temporary object (like the one you're trying to pass in) to a non-`const` reference.

The constructor should probably take `const` references if it doesn't need to modify the strings. Since you're throwing it as an exception, I hope it doesn't really need to modify its parameters because the objects they refer to are probably going to be destroyed when the stack is unwound!