Regex C ++, sequência de escape desconhecida '\.' Aviso

Na primeira vez, tentei usar expressões regulares em C ++ e estou um pouco confuso sobre as seqüências de escape. Estou simplesmente tentando combinar um ponto no início de uma string. Para isso, estou usando a expressão: "^ \\\.", Que funciona, mas meu compilador (g ++) gera um aviso:

warning: unknown escape sequence '\.'
        regex self_regex("^\\\.");
                             ^~

Se eu estiver usando, por exemplo, "^ \\.", Ele não gera um aviso, mas esse regex não corresponde ao que pretendo fazer.

Também não entendo por que tenho que usar três barras invertidas, caso duas não sejam suficientes, em "\". a primeira barra invertida escapa à segunda, para que eu realmente procure por., mas não funciona. Alguém pode esclarecer isso para mim?

Código:

#include <iostream>
#include <dirent.h>
#include <regex>

using namespace std;

int main(void){
    DIR *dir;
    string path = "/Users/-----------/Documents/Bibliothek/MachineLearning/DeepLearning/ConvolutionalNeuralNetworks/CS231n 2016/Assignments/assignment3/assignment3/cs231n";
    regex self_regex("^\\\.+");
    struct dirent *ent;
    dir = opendir(path.c_str());
    if ((dir = opendir(path.c_str())) != NULL){
        while ((ent = readdir(dir)) != NULL){
            if (regex_search(string(ent->d_name),self_regex)){
                cout << "matches regex" << ent->d_name << endl;
            }
            else{
                cout << "does not match regex " << ent->d_name << endl;
            }
        }
        closedir(dir);
    }
    return 0;
}

Resultado:

matches regex.
matches regex..
matches regex.DS_Store
matches regex.gitignore
does not match regex __init__.py
does not match regex __init__.pyc
does not match regex build
does not match regex captioning_solver.py
does not match regex captioning_solver.pyc
does not match regex classifiers
does not match regex coco_utils.py
does not match regex coco_utils.pyc
does not match regex data_utils.py
does not match regex datasets
does not match regex fast_layers.py
does not match regex fast_layers.pyc
does not match regex gradient_check.py
does not match regex gradient_check.pyc
does not match regex im2col.py
does not match regex im2col.pyc
does not match regex im2col_cython.c
does not match regex im2col_cython.pyx
does not match regex im2col_cython.so
does not match regex image_utils.py
does not match regex image_utils.pyc
does not match regex layer_utils.py
does not match regex layers.py
does not match regex layers.pyc
does not match regex optim.py
does not match regex optim.pyc
does not match regex rnn_layers.py
does not match regex rnn_layers.pyc
does not match regex setup.py

questionAnswers(2)

yourAnswerToTheQuestion